Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default working around blank value in IF statements

I have the below formula to calulate benefit increases depending on various
plan dates. It's working perfectly for what I need except that in some
instances there will be no value in cell B3 (a date). I need to figure out
how to rework things so that if B3 is blank the calculations in my IF
statements will still occur and I'm in over my head. Any assistance is
appreciated.

Thanks,
spence

=IF(AND($B$3$N$1,$B$1$N$1,$B$4$N$2),$B$5*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),IF(AND($B$3<$L$1,$B$1<$L$1,$B$4< $L$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1),IF(AND($B$3<$L$1,$B$1<$L$1,$B$4 $N$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1)*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),$B$5)))



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default working around blank value in IF statements

You have:

IF(AND(...

three times, and within each of your ANDs you have some comparison
involving B3.

So, if B3 is blank do you want to return B5? If so, try this addition
to what you already have:

=IF($B$3="",$B$5, your_existing_formula )

Hope this helps.

Pete

On Aug 26, 10:32*pm, spence wrote:
I have the below formula to calulate benefit increases depending on various
plan dates. It's working perfectly for what I need except that in some
instances there will be no value in cell B3 (a date). I need to figure out
how to rework things so that if B3 is blank the calculations in my IF
statements will still occur and I'm in over my head. Any assistance is
appreciated.

Thanks,
spence

=IF(AND($B$3$N$1,$B$1$N$1,$B$4$N$2),$B$5*(($M$2/12)*((YEAR($B$2)-YEAR($L*$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),IF(AND($B$3<$L$1,$B$1<$L$1,$B$4< $L$2)*,$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1),*IF(AND($B$3<$L$1,$B$1<$L$1,$B$4 $N$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$*1))*12+MONTH($B$2)-MONTH($L$1)+1)+1)*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12*+MONTH($B$2)-MONTH($L$2)+1)+1),$B$5)))


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default working around blank value in IF statements

If I understand you, try this:

=IF(AND(or($B$3$N$1,$B$3=""),$B$1$N$1,$B$4$N$2) ,$B$5*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),IF(AND(or($B$3<$L$1,$B$3=""),$B$ 1<$L$1,$B$4<$L$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1),IF(AND(or($B$3<$L$1,$B$3=""),$B$ 1<$L$1,$B$4$N$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1)*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),$B$5)))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"spence" wrote in message
...
I have the below formula to calulate benefit increases depending on various
plan dates. It's working perfectly for what I need except that in some
instances there will be no value in cell B3 (a date). I need to figure out
how to rework things so that if B3 is blank the calculations in my IF
statements will still occur and I'm in over my head. Any assistance is
appreciated.

Thanks,
spence

=IF(AND($B$3$N$1,$B$1$N$1,$B$4$N$2),$B$5*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),IF(AND($B$3<$L$1,$B$1<$L$1,$B$4< $L$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1),IF(AND($B$3<$L$1,$B$1<$L$1,$B$4 $N$2),$B$5*(($M$1/12)*((YEAR($B$2)-YEAR($L$1))*12+MONTH($B$2)-MONTH($L$1)+1)+1)*(($M$2/12)*((YEAR($B$2)-YEAR($L$2))*12+MONTH($B$2)-MONTH($L$2)+1)+1),$B$5)))





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
IF STATEMENTS NOT WORKING Iguss Excel Worksheet Functions 6 November 6th 07 09:52 PM
Solution for charting IF statements that return blank values [email protected] Charts and Charting in Excel 1 December 5th 06 01:20 PM
working with IF statements matty_g Excel Worksheet Functions 8 June 8th 05 09:52 PM
Working with If statements and time Sue Excel Worksheet Functions 1 March 31st 05 06:06 PM
4 different if statements, not working Brian Excel Worksheet Functions 5 December 12th 04 08:17 PM


All times are GMT +1. The time now is 11:52 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"