Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Herman Merman
 
Posts: n/a
Default Sorting Data with External References


I have a data table with headers across two rows, i.e.

Row A: Project
Row B: Number

It is quite a large table with some cells referencing other worksheets
within the same workbook - eg in cell 'AL3' the formula is:

"=SUMIF('Data-Nov'!$B;B,Data!$C3,'Data-Nov'!$AG:$AG)"

I am developing a Macro which selects the entire table and sorts it by
the binary value in column A (i.e. it equals 1 or Nothing).

I am having difficulties getting the data to sort while maintaining its
reference to the correct row number category. At the moment when I sort
the table while indicating there is a header row the "Data!$C3"
reference above is anchored to it's original reference and changes to
return the value in the cell that originally held that data.

So now even though I want the formula in AL3 to return the value based
on the new category of data in C3 it is returning the value based on
what is in the old cell which has changed to C117 (very frustrating).
So my formula is AL3 is now:

"=SUMIF('Data-Nov'!$B;B,Data!$C117,'Data-Nov'!$AG:$AG)"

What I want it to be is:

"=SUMIF('Data-Nov'!$B;B,Data!$C3,'Data-Nov'!$AG:$AG)"

I suspect it has something to do with the two header rows but I can't
remove either of these as other macros are dependent on the information
in both header rows.

Can anybody let me know how to get Excel to sort the table without
anchoring the dependent formula values?


--
Herman Merman
------------------------------------------------------------------------
Herman Merman's Profile: http://www.excelforum.com/member.php...fo&userid=8504
View this thread: http://www.excelforum.com/showthread...hreadid=526315

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
Import external data problem ardi Excel Discussion (Misc queries) 1 April 3rd 06 02:03 PM
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
Excel: Use a name with external workbook reference for data valida Fishyken Excel Worksheet Functions 3 March 11th 05 10:24 PM
Fetching External Data from Excel Sri Excel Discussion (Misc queries) 2 January 3rd 05 11:46 AM


All times are GMT +1. The time now is 12:08 AM.

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"