Using a popup to affect a column of numbers
In article , Don Guillett
writes
something like
sub increasetothree()
newnum=inputbox("Enter new num"
for i= 2 to cells(rows.count, "a").end(xlup).row
if cells(i,"a")<newnum then cells(i,"a")=newnum
next i
end sub
HI Don
OK Thanks for that.
No joy I'm afraid. I ran it but it had no effect on the numbers I had
highlighted. It just needs to affect the selection.
I had these numbers highlighted in the column :
3.00
3.50
4.00
4.50
5.00
5.50
6.00
6.50
7.00
7.50
8.00
8.50
9.00
9.50
I ran the macro and entered the number 7 in the popup and clicked OK. No
effect I'm afraid. They just all stayed the same.
I was hoping for this outcome :
7.00
7.00
7.00
7.00
7.00
7.00
7.00
7.00
7.00
7.50
8.00
8.50
9.00
9.50
I did add a closed bracket after "Enter new num" in your code above.
Grateful if you could advise.
Thanks
|