lundi 31 mars 2014

using a function inside an excel IF and use its return value


Vote count:

0




I use excel for my budget. The top row has the dates when I am paid. I wrote a function called Between which determines if the date I am suppose to pay a particular bill will occur within the timeframe specified in Between. If it does, it will fill the cell with the correct value, otherwise blank. The arguments for Between are Between([cell with start date],[number of days in period], [date to test is in the period],[value to fill cell if date in period]). So, say A1 has 9/1/2014. Between(A1,14,7,500) would put 500 in the cell since the 7th is between 9/1 and 9/15. If A1 was 9/20/2014, the cell would be blank since the 7th is not between 9/20 and 10/4.


I would like to check if Between returns a value vs a blank so I could fill empty cells with a 0 so I can sum up numbers in a row. Suppose I had this expression in a cell say B12:


=IF(ISBLANK(Between(A1,14,7,500),0,?) I want the ? to be the value of Between in the IF statement. How can I get the value of Between into the cell if Between does not return blank?



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire