![]() |
using IF and AND conditions in a macro
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 |
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 |
All times are GMT +1. The time now is 10:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com