Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to Excel...problems with IF function 1

Status
Not open for further replies.

vbridge

Technical User
Jun 27, 2005
15
US
I'm trying to create a spreadsheet that will take a project's cashflow entered into one sheet and put it into another sheet, but I need it to automatically be placed into certain cells depending on the date that is entered. For example, if on the input sheet, they put in a project that will cost $200,000 and cashflow it out to $25,000, $50,000, $10,000, $40,000, and $75,000, and they expect to start in January 2006, the other sheet needs to automatically read the information and put the first value, $25,000 into the cell for January 2006, the 2nd value in the cell for February 2006, the 3rd for March, etc. However, if they wanted to go back and change the date, those values need to automatically move to the new months. I was using an IF function, and it was working well. However, first of all, the function got extremely long and complicated. Second of all, IF functions only hold 7 arguments and I need to be able to cashflow up to 12 months so it's not going to work. If anyone can help me I would greatly appreciate it.
 
You can use multiple IF functions in a cell formula, instead of nesting, like this:

=IF(cellref="Feb",A12,0)+IF(cellref2="Extra",B44,0)+IF(cellref3="Adjust",F5,G6)

But, I'd guess your logic could be implemented more easily by using a combination of MATCH and OFFSET. Have a look at those functions if you think you'll need to experiment a bit.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Using multiple IF functions worked perfectly! Thanks so much!

I tried using the MATCH and OFFSET functions, but I really don't know how to go about doing that. It seems like it would be much easier than having a 7 line function, but I just haven't quite grasped it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top