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
Solved

Simplify an Excel Formula

Posted on 2013-12-12
5
349 Views
Last Modified: 2013-12-16
Does anyone know how to simplify this Excel formula: b12+b19+b27+b34+b42+b49+b56+b64+b71+b78+b86+b93?
0
Comment
Question by:jduran04
5 Comments
 
LVL 42

Expert Comment

by:pcelba
ID: 39713946
This formula is very simple... and I don't see any reason to simplify it.

But you may place it into some unused cell (e.g. az1) and then use just the reference to az1 (multiple times).
0
 
LVL 4

Accepted Solution

by:
gozoliet earned 500 total points
ID: 39713949
Is there a pattern? At first it looked like it was B12 then +7 then +8, +7 etc, but 42-49-56 breaks that.

Is there another column that the selection of cells is based on?

For example if your data was such that you are adding all cells in column B where the value in column A had a specific value or number, you can use SumIF

SUMIF( range, criteria, [sum_range] )

For example if my data was:

Year      Value
2013      1
2013      2
2011      3
2011      4
2012      5
2012      65
2013      7
2013      8
2011      9
2012      9

and I wanted to sum where the year was 2013, I would do:
=SUMIF(A2:A11, 2013, B2:B11)
(which gives me 18)

Hope that helps!
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39713958
Those cells are not equi-distant.  Is that correct?  If so, they are not consistently differently spaced either.  Is that also correct?  If so, the only way to simplify is to name those cells together as a range, then use formula like =SUM(MyNamedRange)

if they should be equidistant, then a formula like:  =SUMPRODUCT((MOD(ROW(B12:B93)-ROW(B12),7)=0)+0,B12:B93)  

where the cells are 7 apart.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 39713968
Other option that this could cover.

If for example your formulas in the source cells are a sum of above eg:

B12 contains =SUM(B1:B11)
B19 contains =SUM(B13:B18) etc

Then in B94 you have the above multiple sums summated, you could change to a SUBTOTAL.

In each of the source SUMS change to SUBTOTAL
B12 contain =SUBTOTAL(9,B1:B11)
B19 contain =SUBTOTAL(9,B13:B18)

Then in B94
=SUBTOTAL(9,B1:B93)

This last SUBTOTAL will ignore other subtotals within the range.

Rather than manually replacing each of the SUMs with SUBTOTALs use the Edit - Replace function (Ctrl + h)

Find SUM(
Replace with SUBTOTAL(9,

Thanks
Rob H
0
 
LVL 23

Expert Comment

by:Danny Child
ID: 39716372
If your cells move a lot, you could use names on them to ensure that you can see that they're correctly defined.  It would make the formula longer, but easier to understand or bug-check.
eg
=SalesJan+SalesFeb+SalesMar

To define the names quickly, select the cell you wish to name, and then type the name in the box to the LEFT of the formula bar (it will currently display the cell ref).

Then, whenever you build a formula that needs that cell, click it, and the formula will use the name, rather than the cell ref.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

829 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