Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this formula:
-- If IsEmpty(Range(d9) Then Range (e11").Formula = =(e5:e8)/4 End If I want to insert the Else statement to do this: If d8 and d9 are both empty then (e5:e7)/3 How do I do it? Thanks, Howard Howard |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If IsEmpty(Range("D8:D9")) Then
Range("E11").Formula = "=(E5:E7)/3" ElseIf IsEmpty(Range("d9") Then Range ("e11").Formula = "=(e5:e8)/4" End If Charles Chickering Howard wrote: I have this formula: -- If IsEmpty(Range("d9") Then Range ("e11").Formula = "=(e5:e8)/4" End If I want to insert the Else statement to do this: If d8 and d9 are both empty then (e5:e7)/3 How do I do it? Thanks, Howard Howard |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
isempty() won't work like you want with multiple cells.
Either if isempty(range("D8").value) _ and isempty(range("d9").value) then 'both empty or if application.counta(range("d8:d9")) = 0 then 'both empty Die_Another_Day wrote: If IsEmpty(Range("D8:D9")) Then Range("E11").Formula = "=(E5:E7)/3" ElseIf IsEmpty(Range("d9") Then Range ("e11").Formula = "=(e5:e8)/4" End If Charles Chickering Howard wrote: I have this formula: -- If IsEmpty(Range("d9") Then Range ("e11").Formula = "=(e5:e8)/4" End If I want to insert the Else statement to do this: If d8 and d9 are both empty then (e5:e7)/3 How do I do it? Thanks, Howard Howard -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Dave.
That will do it! -- Howard "Dave Peterson" wrote: isempty() won't work like you want with multiple cells. Either if isempty(range("D8").value) _ and isempty(range("d9").value) then 'both empty or if application.counta(range("d8:d9")) = 0 then 'both empty Die_Another_Day wrote: If IsEmpty(Range("D8:D9")) Then Range("E11").Formula = "=(E5:E7)/3" ElseIf IsEmpty(Range("d9") Then Range ("e11").Formula = "=(e5:e8)/4" End If Charles Chickering Howard wrote: I have this formula: -- If IsEmpty(Range("d9") Then Range ("e11").Formula = "=(e5:e8)/4" End If I want to insert the Else statement to do this: If d8 and d9 are both empty then (e5:e7)/3 How do I do it? Thanks, Howard Howard -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |