View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
lonnierudd via OfficeKB.com lonnierudd via OfficeKB.com is offline
external usenet poster
 
Posts: 26
Default Avoiding nested if statements?

Well, my pasting and explanation weren't very good in the original table, so
neither of these worked completely (my fault. I only pasted part of the table
and it didn't line up right). The table runs from B10 to B45 and changes each
month, and there isn't anything in Column C (Sorry again). I changed the
INDEX to reflect B10:B45 on Bob's answer, and took the $ signs off and
adjusted the length of the column a little and drug it down and it gives the
correct answer to July 2009 (Woo hoo!), although I must admit I am at a loss
as to understanding why and there's still a year and a half to go. Here's the
formula I used based on what Bob gave:

=INDEX($B$10:$B$45,13-MATCH($B$1,D5:$D$45,0))

Everything from August 2009 to December 2010 has #N/A on it now, probably
because the data ends on D45 I guess? I've never used the index and match
functions before. I need to look into those...

Rick's solution didn't work, but again, I think it was because the help I
tried to give with the columns and rows wasn't clear.

Bob Phillips wrote:
=INDEX($B$2:$B$13,13-MATCH($B$1,$D$16:$D$27,0))

I"ve asked this question before and didn't get an answer, so I thought I'd
phrase it differently. Maybe it isn't possible? If I can't get it to work

[quoted text clipped - 71 lines]
23 14 $7,985 Feb-09 $11,200
'B16


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200807/1