View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
iashorty iashorty is offline
external usenet poster
 
Posts: 41
Default If statement result

I have a formula that is currently in my Excel spreadsheet, but we want to
just show the result in the spreadsheet and not the formula. We also have too
many nested functions for one cell. Can I accomplish both throught VBA?

Here is my formula with too many functions:

=IF($S9=2,IF(ISERROR(INDEX(TABLE,MATCH($B9,blue,0) ,MATCH($T$8,HEADERS,0))),IF(ISERROR(INDEX(TABLE,MA TCH($B9,brown,0),MATCH($T$8,HEADERS,0))),IF(ISERRO R(INDEX(TABLE,MATCH($B9,green,0),MATCH($T$8,HEADER S,0))),IF(ISERROR(INDEX(TABLE,MATCH($B9,red,0),MAT CH($T$8,HEADERS,0))),IF(ISERROR(INDEX(TABLE,MATCH( $B9,yellow,0),MATCH($T$8,HEADERS,0))),"Research",I NDEX(TABLE,MATCH($B9,yellow,0),MATCH($T$8,HEADERS, 0))),INDEX(TABLE,MATCH($B9,red,0),MATCH($T$8,HEADE RS,0))),INDEX(TABLE,MATCH($B9,green,0),MATCH($T$8, HEADERS,0))),INDEX(TABLE,MATCH($B9,brown,0),MATCH( $T$8,HEADERS,0))),INDEX(TABLE,MATCH($B9,blue,0),MA TCH($T$8,HEADERS,0))),"")

this formula basically finds a value in column B to various columns on
different sheets (the colors) and returns the value in the same row under the
heading in T9. It worked until I put yellow in. But, if I can put just the
result of the formula in the spread sheet would not take so long to download
the table.