how do you write this in vba:
if cell value is greater than or equal to 2 change its value to 1
how do you write this in vba:
if cell value is greater than or equal to 2 change its value to 1
![]()
Please Login or Register to view this content.
Gary's Student
what about a worksheet function?
With a worksheet function you would be putting 1 in a separate cell.
if A1 has the value, then in B1:
=IF(A1>=2,1,A1)
Thanks, seperate col is not a problem.
When i tried it in VBA it didnt work out for me...can you see what ive done wrong? ...
doesnt like the range i think.![]()
Please Login or Register to view this content.
We need to loop over the cells in the range:
![]()
Please Login or Register to view this content.
brilliant thanks Jake!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks