Skip to main content

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 Wed, 03/01/2017 - 12:40

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 Wed, 03/01/2017 - 13:18

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.

Brian Element Wed, 03/01/2017 - 13:58

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 Wed, 03/01/2017 - 20:31

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 Thu, 03/02/2017 - 01:42

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