How would i write the code?
I want to be able to select a range in a worksheet and then the vba code should check if that current value is <50 and then change it to -9999 if it is. also i wanted to activate it using a shortcut...ctrl-j or something
How would i write the code?
I want to be able to select a range in a worksheet and then the vba code should check if that current value is <50 and then change it to -9999 if it is. also i wanted to activate it using a shortcut...ctrl-j or something
I have no clue on VBA either with custom functions.
@Rblack40: and your point is ... ?
Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
theck this
![]()
Sub aa() Dim c As Range For Each c In Selection If Not IsEmpty(c) Then If IsNumeric(c.Value) And c.Value < 50 Then c.Value = -9999 End If End If Next End Sub
Regards
tom1977
If You are satisfied with my solution click the small star icon on the left to say thanks.
I posted a thread under User Defined Functions and have no clue of the VBA code.
@Rblack40: again, your post does not comply with forum rules. It has nothing to do with the original question and adds no value. I trust that you are not just trying to up your post count.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks