View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default using IF and AND conditions in a macro


Set givenCell = Range("H10")

If givenCell.Value < 0 And givenCell.Value x Then
givenCell.Value = "N/A"
End If

--

HTH

RP
(remove nothere from the email address if mailing direct)


"iamn94" wrote in message
...
Hello:

As part of the macro that I am writing, I need to set up two conditions

for
a given cell, ie: if the value is less than zero AND its abolute value is
greater than x, then enter the text string "N/A" into the cell.

Any thoughts on how this can be done. New to macro writing so this one

has
me stumped.

thanks for any help that the group can provide.


--
sd