LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
markx
 
Posts: n/a
Default How to simplify "multiple if" formula

Hello,

I have a basic formula in J6 =EDATE(I6;1)

I'm try to extend this formula from J6 to the right (every cell adds one
month to the previous), but once the EDATE([...]6;1) will get bigger than
the value in cell D4, I would like to have the formula giving me "" (empty
cell).

I started with
=IF(EDATE(I4;1)$D$4;"";EDATE(I4;1))
but it's not good enough: the first cell that is bigger than $D$4 is indeed
blank, but all the following give me #VALUE error.

So I modified to
=IF(OR(EDATE(I4;1)$D$4;ISERROR(EDATE(I4;1)));"";E DATE(I4;1))
but it's the same: first cell bigger than D4 value is blank (that's fine!),
but then I still can't get rid of #VALUE errors that follow (:-().

So I reformulated it to
=IF(ISERROR(EDATE(I4;1));"";IF(EDATE(I4;1)$D$4;"" ;EDATE(I4;1)))
and it's functionning correctly (finally!): all the cells bigger than the
value in D4 are blank!

I'm asking however myself if I can simplify the last formula and make it
look "nicer"...
The other question I have is why the second formula (with OR argument) is
not functionning like the third...

Thank you in advance for any hints regarding this,
Regards,

Mark


 
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
assign formula to another cell Dannycol Excel Worksheet Functions 3 May 12th 06 09:46 PM
Custom function to simplify Index(match)) formula Martin Excel Discussion (Misc queries) 0 March 20th 06 02:45 PM
Simplify excel formula Lulu Excel Discussion (Misc queries) 2 August 25th 05 08:43 AM
adding row to forumla carrera Excel Discussion (Misc queries) 9 August 23rd 05 10:24 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 02:01 AM.

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

About Us

"It's about Microsoft Excel"