Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-04-2018, 01:37 AM
santors71 santors71 is offline Need help with a formula Windows 7 32bit Need help with a formula Office 2010 32bit
Novice
Need help with a formula
 
Join Date: Dec 2011
Posts: 5
santors71 is on a distinguished road
Default Need help with a formula

Hello, need help with this formula.
Want to change the numbers in boxes B12 (2) and D12 (3) to sum the columns from M7 (2) to O7 (3)
Then the sum will be 8431. When I then change the digits in the boxes, the summary will change.
Have tested several options but not good enough.


Have any desire to help me, see attached file
Anders
Attached Files
File Type: xlsx sum.xlsx (9.4 KB, 14 views)
Reply With Quote
  #2  
Old 06-04-2018, 02:33 AM
ArviLaanemets ArviLaanemets is offline Need help with a formula Windows 8 Need help with a formula Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Code:
=sum(offset($l$3,4,$b$12-1,1,$d$12))
Reply With Quote
  #3  
Old 06-04-2018, 06:12 AM
santors71 santors71 is offline Need help with a formula Windows 7 32bit Need help with a formula Office 2010 32bit
Novice
Need help with a formula
 
Join Date: Dec 2011
Posts: 5
santors71 is on a distinguished road
Unhappy

Sorry, I can't get this formula working. It looks it get static
I need to change the numbers 2 and 3 and get new figures
Best regards
Anders
Reply With Quote
  #4  
Old 06-04-2018, 07:36 AM
NBVC's Avatar
NBVC NBVC is offline Need help with a formula Windows 10 Need help with a formula Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Try:


=SUM(INDEX($L$7:$Q$7,B12):INDEX($L$7:$Q$7,D12))
Reply With Quote
  #5  
Old 06-04-2018, 07:51 AM
ArviLaanemets ArviLaanemets is offline Need help with a formula Windows 8 Need help with a formula Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

For me it works!
Attached Files
File Type: xlsx sum.xlsx (9.7 KB, 9 views)
Reply With Quote
  #6  
Old 06-04-2018, 11:08 PM
santors71 santors71 is offline Need help with a formula Windows 7 32bit Need help with a formula Office 2010 32bit
Novice
Need help with a formula
 
Join Date: Dec 2011
Posts: 5
santors71 is on a distinguished road
Default

Big thanks now it works
Reply With Quote
  #7  
Old 06-04-2018, 11:33 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Need help with a formula Windows 7 64bit Need help with a formula Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Be aware that OFFSET is a volatile function.
The solution on post #4 is not
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #8  
Old 06-05-2018, 03:06 AM
Roger Govier Roger Govier is offline Need help with a formula Windows 10 Need help with a formula Office 2016
Novice
 
Join Date: Oct 2017
Location: Abergavenny, Wales, UK
Posts: 13
Roger Govier is on a distinguished road
Default

Arvi's formula works fine.
If it was returning a static result, then your Calculation mode must have been set to manual.

Yes, that is a volatile function, however the non-volatile Index formula will return the wrong result unless you add 1 to the value in your box D12
Code:
=SUM(INDEX(L7:Q7,B12):INDEX(L7:Q7,D12+1))
Reply With Quote
  #9  
Old 06-05-2018, 05:42 AM
NBVC's Avatar
NBVC NBVC is offline Need help with a formula Windows 10 Need help with a formula Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

It's a matter of what the OP really meant by "M7 (2) to O7 (3)". Is that O7 reference correct? The 3 coincides with column N. My assumption, I guess what the OP really meant to add from M7(2) to N7(3).
Reply With Quote
  #10  
Old 06-05-2018, 06:30 AM
ArviLaanemets ArviLaanemets is offline Need help with a formula Windows 8 Need help with a formula Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Quote:
Originally Posted by Pecoflyer View Post
Be aware that OFFSET is a volatile function.
As the formula will be obviously in single cell, it will be no problem at all!

Quote:
Is that O7 reference correct?
I checked sums for different possibilities and made a comparison with OP's sum. As result I decided, that B12 is number of start column in datarange (L4:Q7), and D12 is number of columns to sum.

Btw, the formula using OFFSET allows to use 4 parameters to select the sum range. OP can determine the row from where summarizing begins (currently fixed at 4), and the number of rows to summarize (currently fixed at 1).
Reply With Quote
  #11  
Old 06-19-2018, 02:43 AM
Debaser's Avatar
Debaser Debaser is offline Need help with a formula Windows 7 64bit Need help with a formula Office 2010 32bit
Competent Performer
 
Join Date: Oct 2015
Location: UK
Posts: 221
Debaser will become famous soon enough
Default

Also, INDEX():INDEX() is still semi-volatile. It will recalculate when the workbook is opened.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Copy Row 2 Row But Next Column In Formula From Another Tab TimG Excel 3 04-16-2018 09:20 PM
Need help with a formula Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula innkeeper9 Excel 2 09-13-2016 08:59 PM
Need help with dragging a formula and changing a reference column as I drag the formula. LupeB Excel 1 10-22-2015 03:02 PM
help with a formula srockwell25 Excel 4 08-22-2014 02:47 AM
Need help with a formula Help with formula please. AndrewSE Excel 3 04-05-2011 08:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft