Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|