#1   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Sumif & Sort

I wrote a simple sumif function in a column and copied down the range,

=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!A2,'Unit-E data'!G:G)


That was fine, but when I tried to sort the range I noticed that criteria
(cell reference) changed from A2 to something totally different for the row 2.

Is there any way to get round this problem?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Sumif & Sort

Once you have copied the formula down, highlight all the cells with
the formula in and CTRL-H (Find & Replace):

Find what: ation'!A
Replace with: ation'!A$
Click Replace All

Hope this helps.

Pete

On Dec 5, 8:48*am, nc wrote:
I wrote a simple sumif function in a column and copied down the range,

=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!A2,'Unit-E data'!G:G)

That was fine, but when I tried to sort the range I noticed that criteria
(cell reference) changed from A2 to something totally different for the row 2.

Is there any way to get round this problem?


  #3   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Sumif & Sort

Thanks.

Did you mean

Replace with: ation'!$A


I replaced with the above and it solved the problem.


"Pete_UK" wrote:

Once you have copied the formula down, highlight all the cells with
the formula in and CTRL-H (Find & Replace):

Find what: ation'!A
Replace with: ation'!A$
Click Replace All

Hope this helps.

Pete

On Dec 5, 8:48 am, nc wrote:
I wrote a simple sumif function in a column and copied down the range,

=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!A2,'Unit-E data'!G:G)

That was fine, but when I tried to sort the range I noticed that criteria
(cell reference) changed from A2 to something totally different for the row 2.

Is there any way to get round this problem?



  #4   Report Post  
Posted to microsoft.public.excel.misc
nc nc is offline
external usenet poster
 
Posts: 119
Default Sumif & Sort

Hi Pete

I just realised that when I used

Replace with: ation'!$A

After sorting I get

=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A2,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A5,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A6,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A7,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A11,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A12,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A13,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A14,'Unit-E data'!G:G)
=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!$A15,'Unit-E data'!G:G)

for rows 1-10, for criteria was expecting ation'!$A2, ation'!$A3, ation'!$A4
etc.

When I change the sheet reference to just the cell reference A2, A3, A4
etc., the criteria is fine after sorting.



"Pete_UK" wrote:

Once you have copied the formula down, highlight all the cells with
the formula in and CTRL-H (Find & Replace):

Find what: ation'!A
Replace with: ation'!A$
Click Replace All

Hope this helps.

Pete

On Dec 5, 8:48 am, nc wrote:
I wrote a simple sumif function in a column and copied down the range,

=SUMIF('Unit-E data'!A:A,'Unit-E data consolidation'!A2,'Unit-E data'!G:G)

That was fine, but when I tried to sort the range I noticed that criteria
(cell reference) changed from A2 to something totally different for the row 2.

Is there any way to get round this problem?



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
Sort of like SUMIF and COUNTIF - but return a conditional value hr38581 Excel Discussion (Misc queries) 2 May 3rd 08 04:28 PM
Excel sort by Fill Color by custom list sort Dash4Cash Excel Discussion (Misc queries) 2 July 29th 05 10:45 PM
sort by SUMIF results dcd123 Excel Worksheet Functions 2 July 20th 05 08:26 PM
using sumif & countif to sort multiple cells floridasurfn Excel Worksheet Functions 3 February 27th 05 09:23 PM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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