#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default If Formula

On Tue, 18 Aug 2009 12:16:48 -0700 (PDT), Redi
wrote:

I think that i solved what i was looking to do.

Changed the formula from -1 to -9.


=IF(SUM(OFFSET(colors,SUM(ROW()-ROW(colors)),0))COLUMN()-COLUMN
(result),
INDEX(colors,SMALL(IF(OFFSET(colors,SUM(ROW()-ROW(colors)),0)=1,
COLUMN(colors)-9),1+COLUMN()-COLUMN(result))),"")

Thank you!!!


OK, now I see. If your colors are not starting in column B you will
have the wrong result if you just subtract 1.
The thing you should subtract is MIN(COLUMN(colors)-1
giving the following formula that I hope should survive insertion of
new columns to the left for example.

=IF(SUM(OFFSET(colors,SUM(ROW()-ROW(colors)),0))COLUMN()-
COLUMN(result),INDEX(colors,SMALL(IF(OFFSET(colors ,SUM(ROW()-
ROW(colors)),0),COLUMN(colors)-MIN(COLUMN(colors))+1),
1+COLUMN()-COLUMN(result))),"")

Hope this helps / Lars-Åke
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



All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"