?
Solved

Excel 2010 creating a custom auto fill for formulas

Posted on 2014-11-16
2
Medium Priority
?
280 Views
Last Modified: 2014-11-16
I have a spreadsheet in Excel 2010 with 1440 rows.  I have a formula I need copied to all rows.  I'd like to enter in the formula for the first few rows and then use Excel's Auto Fill to fill in the formula for the rest of the rows.

The formula for the first three rows are:
=SUMIF(B2:B1440,B2,D2:D1440)
=SUMIF(B2:B1440,B3,D2:D1440)
=SUMIF(B2:B1440,B4,D2:D1440)

In the SUMIF formula, the criteria changes but the range and sum_range remain the same.  If I use auto fill, I want only the criteria to increase, so the next four rows would be:
=SUMIF(B2:B1440,B5,D2:D1440)
=SUMIF(B2:B1440,B6,D2:D1440)
=SUMIF(B2:B1440,B7,D2:D1440)
=SUMIF(B2:B1440,B8,D2:D1440)

But that's not what I'm getting.  Instead, I'm getting:
=SUMIF(B5:B1443,B5,D5:D1443)
=SUMIF(B5:B1443,B6,D5:D1443)
=SUMIF(B5:B1443,B7,D5:D1443)
=SUMIF(B8:B1446,B8,D8:D1446)

How do I get the auto fill to only increase the criteria part of the formula and leave everything else in the formula alone?
0
Comment
Question by:David_XF
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 2000 total points
ID: 40445905
You can use absolute addressing for range:
=SUMIF($B$2:$B$1440,B2,$D$2:$D$1440)
0
 

Author Comment

by:David_XF
ID: 40446031
That is exactly what I was looking for.  Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question