Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Index lookup change data

I am trying to take this formula and move it from on column to another and
only change one value. When I go to edit the formula it removes the "{}"
around the formula. The formula works in the original cells but If I add the
"{}" it will not caluculate.

{=IF(ISERROR(INDEX($T$1:$W$2500,SMALL(IF($T$1:$T$2 500=$A3,ROW($T$1:$T$2500)),ROW($8:$8)),4)),"",(IND EX($T$1:$W$2500,SMALL(IF($T$1:$T$2500=$A3,ROW($T$1 :$T$2500)),ROW($8:$8)),4)))}


I just want to change row 8:8 to row 9:9 and so on. If I edit the original
cell it changes the formula to remove the "{}" and the formula will no longer
pull the data. Please help with how to correct this issue. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Index lookup change data

The squiggly brackets { } denote an array formula.

**Array formulas are entered differently than a regular formula. After you
type in a regular formula you hit the ENTER key. With an array formula you
*must* use a combination of keys. Those keys are the CTRL key, the SHIFT key
and the ENTER key. That is, hold down both the CTRL key and the SHIFT key
then hit the ENTER key.

When done properly Excel will enclose the formula in squiggly brackets { }.
You can't just type these brackets in, you *must* use the key combo to
produce them. Also, anytime you edit an array formula it *must* be
re-entered as an array using the key combo.

As far as the formula itself, it can be made much more efficient.

I'd use an intermediate cell to count how many records meet the criteria...

Enter this formula in cell A1:

=COUNTIF(T1:T2500,A3)

Then, you refer to that cell and you can replace all this:

{=IF(ISERROR(INDEX($T$1:$W$2500,SMALL(IF($T$1:$T$ 2500=$A3,ROW($T$1:$T$2500)),ROW($8:$8)),4))


With something like this:

=IF(ROWS(A$1:A8)$A$1,"",........

Here's the entire array entered** formula:

=IF(ROWS(A$1:A8)$A$1,"",INDEX($T:$T,SMALL(IF($T$1 :$T$2500=$A3,ROW(T$1:T$2500)),ROWS(A$1:A8))))

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
I am trying to take this formula and move it from on column to another and
only change one value. When I go to edit the formula it removes the "{}"
around the formula. The formula works in the original cells but If I add
the
"{}" it will not caluculate.

{=IF(ISERROR(INDEX($T$1:$W$2500,SMALL(IF($T$1:$T$2 500=$A3,ROW($T$1:$T$2500)),ROW($8:$8)),4)),"",(IND EX($T$1:$W$2500,SMALL(IF($T$1:$T$2500=$A3,ROW($T$1 :$T$2500)),ROW($8:$8)),4)))}


I just want to change row 8:8 to row 9:9 and so on. If I edit the original
cell it changes the formula to remove the "{}" and the formula will no
longer
pull the data. Please help with how to correct this issue. Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Index lookup change data

Ooops!

Correction. I indexed the wrong column. Should be (still array entered):

=IF(ROWS(A$1:A8)$A$1,"",INDEX($W:$W,SMALL(IF($T$1 :$T$2500=$A3,ROW(T$1:T$2500)),ROWS(A$1:A8))))

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
The squiggly brackets { } denote an array formula.

**Array formulas are entered differently than a regular formula. After you
type in a regular formula you hit the ENTER key. With an array formula you
*must* use a combination of keys. Those keys are the CTRL key, the SHIFT
key and the ENTER key. That is, hold down both the CTRL key and the SHIFT
key then hit the ENTER key.

When done properly Excel will enclose the formula in squiggly brackets
{ }. You can't just type these brackets in, you *must* use the key combo
to produce them. Also, anytime you edit an array formula it *must* be
re-entered as an array using the key combo.

As far as the formula itself, it can be made much more efficient.

I'd use an intermediate cell to count how many records meet the
criteria...

Enter this formula in cell A1:

=COUNTIF(T1:T2500,A3)

Then, you refer to that cell and you can replace all this:

{=IF(ISERROR(INDEX($T$1:$W$2500,SMALL(IF($T$1:$T $2500=$A3,ROW($T$1:$T$2500)),ROW($8:$8)),4))


With something like this:

=IF(ROWS(A$1:A8)$A$1,"",........

Here's the entire array entered** formula:

=IF(ROWS(A$1:A8)$A$1,"",INDEX($T:$T,SMALL(IF($T$1 :$T$2500=$A3,ROW(T$1:T$2500)),ROWS(A$1:A8))))

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
I am trying to take this formula and move it from on column to another and
only change one value. When I go to edit the formula it removes the "{}"
around the formula. The formula works in the original cells but If I add
the
"{}" it will not caluculate.

{=IF(ISERROR(INDEX($T$1:$W$2500,SMALL(IF($T$1:$T$2 500=$A3,ROW($T$1:$T$2500)),ROW($8:$8)),4)),"",(IND EX($T$1:$W$2500,SMALL(IF($T$1:$T$2500=$A3,ROW($T$1 :$T$2500)),ROW($8:$8)),4)))}


I just want to change row 8:8 to row 9:9 and so on. If I edit the
original
cell it changes the formula to remove the "{}" and the formula will no
longer
pull the data. Please help with how to correct this issue. Thanks





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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with INDEX lookup Vegas Sara[_2_] Excel Worksheet Functions 15 September 30th 09 10:35 PM
Lookup? Index? or something else? Notify Excel Discussion (Misc queries) 0 May 6th 09 05:53 PM
How to stop index match returning data where lookup cell empty Diddy Excel Worksheet Functions 4 January 18th 09 11:09 PM
Either LOOKUP or INDEX Help Bob Walters[_2_] Excel Worksheet Functions 4 September 27th 07 06:35 PM
Only text values matching using index/match lookup - data type pro Stanton Excel Worksheet Functions 1 August 2nd 05 01:05 AM


All times are GMT +1. The time now is 04:39 PM.

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

About Us

"It's about Microsoft Excel"