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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'and' statement in writing a macro.

Status
Not open for further replies.

fiel

Programmer
Jun 3, 2007
96
US
I'm trying to do an if statement as follows:

If (Cells(r, c) > 20) & (Cells(r, c) < 25) then

I'm trying to check for a cell between two values but am not sure on how to do this boolean statement with the '&' sign. Any ideas?
 
for future reference, VBA/Macro-specific questions should be posted in forum707.

Is this what you want:

If (Cells(r, c) > 20) And (Cells(r, c) < 25) Then


[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top