Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro - Random Number

Status
Not open for further replies.

Brianfree

Programmer
Feb 6, 2008
220
GB
Hi, i have a spread sheet with column A being a part number and column B being a qty so for example..

Part Number, QTY
abc123, 10
abc456, 90
abc789, 1
def123, 67

I want to write a macro that checks the values in column B and if the value is greater than 49 pick a random number between 30 & 49 and update the value, if is less than 49 i want the value to be left untouched.

Please can anyone advise

Many thanks

Brian
 
hi,

What have you tried?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
How are ya Brianfree . . .

In the real world, inventory quantities would not be changed this way (unreal). Whats the point? ...

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top