Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Array formula returning #N/A when inserting new rows.

Hi,

Tom Ogilvy provided this excellent array formula for me a while ago
which looks up and returns data that contains the keyword "Playing" in
another worksheet. I have the formula in 5 columns and 11 rows. It
works great but it causes problems when I try to insert rows above the
formula, as it returns #N/A.

here is the formula...

=OFFSET(Teams!$A$1,SMALL(IF(Teams!$C$83:$C$105="Pl aying",ROW($C$83:$C$105)),ROW($A1))-1,4)

If I insert a row above it recalulates the formula to...

=OFFSET(Teams!$A$1,SMALL(IF(Teams!$C$83:$C$105="Pl aying",ROW($C$83:$C$106)),ROW($A1))-1,4)

Note that the first ROW has increased from $C$105 to $C$106.

Can someone help?

Thanks
Tony

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Array formula returning #N/A when inserting new rows.

since ROW is returning a row number, it didn't make any difference what
sheet it was on - so I referred to the sheet with the formula. However, to
avoid problem, refer to the lookup sheet like this:

=OFFSET(Teams!$A$1,SMALL(IF(Teams!$C$83:$C$105="Pl aying",ROW(Teams!$C$83:$C$
106)),ROW(Teams!$A1))-1,4)

since you won't be adding rows there.

--
Regards,
Tom Ogilvy



wrote in message
ups.com...
Hi,

Tom Ogilvy provided this excellent array formula for me a while ago
which looks up and returns data that contains the keyword "Playing" in
another worksheet. I have the formula in 5 columns and 11 rows. It
works great but it causes problems when I try to insert rows above the
formula, as it returns #N/A.

here is the formula...


=OFFSET(Teams!$A$1,SMALL(IF(Teams!$C$83:$C$105="Pl aying",ROW($C$83:$C$105)),
ROW($A1))-1,4)

If I insert a row above it recalulates the formula to...


=OFFSET(Teams!$A$1,SMALL(IF(Teams!$C$83:$C$105="Pl aying",ROW($C$83:$C$106)),
ROW($A1))-1,4)

Note that the first ROW has increased from $C$105 to $C$106.

Can someone help?

Thanks
Tony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Array formula returning #N/A when inserting new rows.

Tom,
You are a gem. Thanks again
Tony

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
Inserting Formula into Array [email protected] Excel Discussion (Misc queries) 17 July 2nd 07 06:14 PM
Array formula returning the cumulative sum vsoler Excel Worksheet Functions 15 June 15th 07 10:54 PM
Array formula returning wrong results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 19th 05 10:29 AM
Array formula returning terminated employees malik641 Excel Worksheet Functions 4 August 16th 05 03:24 PM
Returning an Array as part of creating a cell formula Guy Hoffman[_5_] Excel Programming 0 January 12th 04 02:32 PM


All times are GMT +1. The time now is 08:37 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"