Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for Copying with conditions MH Excel Discussion (Misc queries) 0 March 10th 10 10:32 PM
macro for excel msg pop up when certain conditions are met Jenny Excel Discussion (Misc queries) 4 August 17th 09 09:27 PM
Countif Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
shade cells based on conditions - i have more than 3 conditions Mo2 Excel Worksheet Functions 3 March 30th 07 07:19 AM
Need continuously running macro when conditions are met Cynthia[_3_] Excel Programming 1 February 7th 04 05:07 PM


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"