Micro Focus QTP (UFT) Forums
How to increase numbers for value in Excel - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to increase numbers for value in Excel (/Thread-How-to-increase-numbers-for-value-in-Excel)



How to increase numbers for value in Excel - Jyobtech - 10-26-2012

Hi Experts,
In my regression data sheet(.xls), Everytime new value has to provide.
For example Right now I have the value in data sheet like "BUNA17" , and want to increase this value BUNA18,BUNA19,BUNA20... etc by using function in excel.
If I use RANDBETWEEN function,it gives random numbers but I want that random number uniquely(same number can't be used next time)

Please helpme out.


RE: How to increase numbers for value in Excel - Ankesh - 10-26-2012

why dont you use a loop and keep incrementing the value! You can use any loop. Below is a sample loop.

Code:
For i=1 to 10
strVal="BUNA"&i
'Write value to excel
Next

Regards,
Ankesh


RE: How to increase numbers for value in Excel - Jyobtech - 10-26-2012

Thanks for response Ankesh,

I am not writing the values in my excel sheet.(I should update the values in excel before the every script execution,otherwise the script will fail.Is there any method insipte of manual updating the values in excel)

I want to do the logic in EXCEL only .
Example in excel column =RANDBETWEEN(10,30) gives only vales between 10 to 30 . I want the same values not in randam order ,it should be countinuesly(Is there any function in excel)