Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there any scope to increment digit in excel?

I have created a UDF in excel. Here is the function with cell reference as arguments:

=getInfo($A$3,B2,3)

In the above arguments, "3" is actually the row number which will be used for a calculation. Now if I drag this UDF over rows, the B2 is incremented as it is a cell reference (Range) but 3 is not incremented as it is a digit only. I need to use this third argument sometimes fixed (which is actually works in current condition), but sometimes I need to increment this argument while dragging.

My query is, is there any scope/option to increment the only digit in UDF without passing an additional optional argument for increment (eg: 3+1 or let’s say I put 3 in any cell and use that cell to increment it by 1 for every row dragging)?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use Row() function. Try-

=getInfo($A$3,B2,Row(A3))

When you drag it to 1 cell down then formula will =getInfo($A$3,B3,Row(A4)) means row argument 4.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading