Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I'm using the following formula in a routine:
Range("G11:CX298").Formula = "=IF(AND($DX11<$B11,$G11="".""),$DZ11)" If the criteria = true then it placecs the value of $DZ11 which is wan I want. What do I put in for the false part of the statement if I want to tak no action? I don't want to clear or change the contents at all if th condition is false. Thank -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to put a formula in the cell then it has to
take an action. Otherwise you could do something like this: If Range("DX11").Value < Range("B11").Value And Range ("G11").Value = "" Then Range("G11:CX298").Value = Range("$DZ11").Value End If tod -----Original Message----- Hi I'm using the following formula in a routine: Range("G11:CX298").Formula = "=IF(AND ($DX11<$B11,$G11="".""),$DZ11)" If the criteria = true then it placecs the value of $DZ11 which is want I want. What do I put in for the false part of the statement if I want to take no action? I don't want to clear or change the contents at all if the condition is false. Thanks --- Message posted from http://www.ExcelForum.com/ . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The formula as written checks each row and makes a determination for that
particular row against the values in that row. Your check only checks a single row and then imposes the formula on all rows, 11 to 298. I agree with you comment, but you would need to loop down the range and check the conditions for each row, posting a result particular to that row. -- Regards, Tom Ogilvy "Tod" wrote in message ... If you want to put a formula in the cell then it has to take an action. Otherwise you could do something like this: If Range("DX11").Value < Range("B11").Value And Range ("G11").Value = "" Then Range("G11:CX298").Value = Range("$DZ11").Value End If tod -----Original Message----- Hi I'm using the following formula in a routine: Range("G11:CX298").Formula = "=IF(AND ($DX11<$B11,$G11="".""),$DZ11)" If the criteria = true then it placecs the value of $DZ11 which is want I want. What do I put in for the false part of the statement if I want to take no action? I don't want to clear or change the contents at all if the condition is false. Thanks --- Message posted from http://www.ExcelForum.com/ . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the input guys, back to the drawing board..
-- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Once you put the formula in, it overwrites whatever was there. If you just
want the cell to appear blank, then you would put in """" for the false condition. If you mean the cell already contains something which you want to retain, then you can't do that unless for each cell in the range, you build the formula individually for each cell, putting the current value as the False result. -- Regards, Tom Ogilvy "hotherps " wrote in message ... Hi I'm using the following formula in a routine: Range("G11:CX298").Formula = "=IF(AND($DX11<$B11,$G11="".""),$DZ11)" If the criteria = true then it placecs the value of $DZ11 which is want I want. What do I put in for the false part of the statement if I want to take no action? I don't want to clear or change the contents at all if the condition is false. Thanks --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions |