MrExcel Message Board

Excel In Depth by Bill Jelen


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Notices

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Apr 21st, 2002, 10:42 AM   #1
Boatman
New Member
 
Join Date: Apr 2002
Posts: 2
Default

I need to copy a SUM formula across a worksheet. The formula is summing a range in a column in another worksheet. When I copy the SUM formula across, the column reference in the formula needs to remain the same, but the rows in the range need to change.
Boatman is offline   Reply With Quote
Old Apr 21st, 2002, 10:55 AM   #2
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-04-21 10:42, Boatman wrote:
I need to copy a SUM formula across a worksheet. The formula is summing a range in a column in another worksheet. When I copy the SUM formula across, the column reference in the formula needs to remain the same, but the rows in the range need to change.
Use a mixed Cell reference in your formula ... preceding the Column lable with $ will make the Columnb reference absolute.
For example in $A$1 ... both Column and Row references are absolute
and in $A1 ... Column reference is absolute and Row reference is relative,
so you could have 4 possible combinations ...
A1; $A1; A$1; and $A$1 ... relative, mixed, and absolute.

HTH

__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Apr 21st, 2002, 11:10 AM   #3
eliW
Board Regular
 
eliW's Avatar
 
Join Date: Mar 2002
Posts: 1,828
Default

Quote:
On 2002-04-21 10:42, Boatman wrote:
I need to copy a SUM formula across a worksheet. The formula is summing a range in a column in another worksheet. When I copy the SUM formula across, the column reference in the formula needs to remain the same, but the rows in the range need to change.
=SUM(Sheet2!$D1:$D10)
when you put this formula in A1 it will sum the first 10 cells in column D in sheet2. Now if you want to copy the formula to B6 or C6 etc. it will sum cells D6:D15 in sheet2
Eli
eliW is offline   Reply With Quote
Old Apr 21st, 2002, 11:52 AM   #4
Boatman
New Member
 
Join Date: Apr 2002
Posts: 2
Default

Attn: EliW

The formula you suggest is the one I'm using.
I'm trying to copy the formula from A1 to cells in the same row. I make the column absolute and the rows relative, but the formula when copied across the same row does not change. I could see the row references changing by one row if I dropped down one row, but how do you make them change without dropping down?
Boatman is offline   Reply With Quote
Old Apr 21st, 2002, 02:23 PM   #5
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Boatman,

you need to tell us what you want them to change by...... if the change is uniform we can probably cope but if it's "random" that might be trickier.....

give us specific references
Chris Davison is offline   Reply With Quote
Old Apr 22nd, 2002, 04:58 AM   #6
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

via email

=SUM(Sheet2!$D1:$D10) This appears in cell A1 in Sheet 1

I want to copy the above formula to cells B1, C1, D1 etc. in
Sheet 1. The
results I want is as follows:

=SUM(Sheet2!$D2:$D11) in cell B1 Sheet 1
=SUM(Sheet2!$D3:$D12) in cell C1 Sheet 1
=SUM(Sheet2!$D4:$D13) in cell D1 Sheet 1

In other words I need the row range to change 1 row down, not
the column,
when I copy the formula across columns in sheet 1.

Thanks.
-----------------------------

=SUM(INDIRECT("Sheet2!$D"&COLUMN(A:A)):INDIRECT("Sheet2!$D"&COLUMN(J:J)))

and copy accross


__________________
:: Pharma Z - Family drugstore ::
Chris Davison is offline   Reply With Quote
Old Apr 22nd, 2002, 03:42 PM   #7
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default


=SUM(INDIRECT("Sheet2!$D"&COLUMN(A:A)):INDIRECT("Sheet2!$D"&COLUMN(J:J)))


for another take on Chris' very versatile formula, you could salso use

=SUM(INDIRECT("Sheet2!$D"&COLUMN(A:A)):INDIRECT("Sheet2!$D10"))

Admittedly, Chris' is more comprehensive!




__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Apr 22nd, 2002, 06:24 PM   #8
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Yogi mate,

your D10 is static isn't it ? we need it to increment by 1 each time it's copied to the next cell to the right, hence my "column" function....

(we need the rows of the range to drop, so the last reference's row needs to increase the same as the first's)

Chris
Chris Davison is offline   Reply With Quote
Old Apr 22nd, 2002, 06:28 PM   #9
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Hi Chris:
You are absolutely right, my friend!

Regards!
Yogi Anand
Yogi Anand is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:43 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes