1

I'm trying to write inside a button in a userform to clear the cell if it is less than 1%

Range("G9:G28").Select Selection.ClearContents if range("g9:g28) < 0 

This is probably very wrong

1 Answer 1

2
dim c as range for each c in activesheet.range("G9:G28") if c.value < 0 then c.clearcontents next 
Sign up to request clarification or add additional context in comments.

1 Comment

Maybe if c.value2 < 0.01 then c.clearcontents ...? I'm not sure if the narrative or the code in the OP is correct.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.