Numbering

8 posts / 0 new
Last post
McRete
Offline
Joined: 03/01/2017 - 12:08
Numbering

Hello,
im new to IDEA and could need a little help. 
This is what i had:             This is what i got after using @GetPreviousValue:            This is what i need:
NR          NAME                    NR          NAME                                                                                   NR        NAME        NR2
1              abc                            1              abc                                                                                          1             abc               1
1              abc                                             abc                                                                                                         abc               2
1              abc                                             abc                                                                                                         abc               3
2              xyz                            2              xyz                                                                                           2           xyz                1
2              xyz                                             xyz                                                                                                         xyz               2
AND if "NR2" = 5,10,15.... i need "NR" again with the value that belongs to the NAME (like: 1    abc, 2   xyz).
Could someone help with the function for "NR2" and the function with %5 (or something like that i guess)
Thanks a lot!

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Stefano and welcome to the site.

Interesting problem you have.  Can you attach a spreadsheet with your scenario  also showing how you want to handle when NR2 = 5, 10, 15, etc.  Once I see it I can probably tell if there is a way to do it through the equation editor or it might need a script to do what you are looking for.

Thanks

Brian

McRete
Offline
Joined: 03/01/2017 - 12:08

Hi Brian,
i added an xlsx to show how it should look like. but i cant use the real information (cant show a picture for example).  for this 5,10,15 etc. problem i thought about using some function with %5.  thats all i know right now. im just learning how to use it.

Files: 
McRete
Offline
Joined: 03/01/2017 - 12:08

Oh and thanks for the quick answer and trying to help.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Thanks for the spreadsheet it helps me understand the problem.  I will have to think about this one and get back to you as it isn't an obvious solution.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Stefano,

I have attached a script that will hopefully do what you want.  I didn't do a dialog so you might have to go in and make some changes to the script to get it working.

Where you see SOURCE_FILE put in the name of your file.  Run and hopefully you won't get any errors, if you do let me know and I will adjust the code.

Good luck.

Brian

McRete
Offline
Joined: 03/01/2017 - 12:08

Hi Brian,
thanks for the help. But i cant see the script. Only part of it in the picture.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Sorry, my fault, the script didn't get uploaded.  It should be there now as an attachment.