×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Dynamic Summation in Excel formula

Dynamic Summation in Excel formula

Dynamic Summation in Excel formula

(OP)
Greetings of the day....

I am trying to make one dynamic SUM in excel.
i want to input the different depths in G & H column. The layers with SAND thickness should be returned in I column. the extra difference also should be included with in.




The sample file i have attached. I tried some approach but it;s very complex and need continuous check.

Can anyone help me with this?

Link

RE: Dynamic Summation in Excel formula

It would help if you would upload your workbook.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Dynamic Summation in Excel formula

Ok, so what specific questions do you have?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Dynamic Summation in Excel formula

(OP)
Is it possible to make some (more simple to decipher) formula which will work if my row 3 to 10 is changed to row 3 to 17.

RE: Dynamic Summation in Excel formula

You need to explain your desire in more detail. At least, show in your spreadsheet what values are to be calculated from which inputs. I can't read your mind, and the numbers you have the sheet don't seem to correlate to anything

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

RE: Dynamic Summation in Excel formula

What version of Excel - there are features that can make this much easier but only appear in later versions.

RE: Dynamic Summation in Excel formula

I think I understand what you are wanting.

First, you stated that your table is growing. I assume you mean the table in columns A:D. I made that table a Structured Table so that ALL the formulas now use Structured Table References, so it doesn't matter how many layers your table has. The Structured Table default name is Table1. No more A1 notation for table references. And BTW, your original references to those ranges were all INCORRECT!

If the last row of your table is a "Sand" Material, you must add a "Non Sand" row. My example shows such a row. Failing to do so will result in an incorrect summation.

The OFFSET() function was complicating your approach. Rather, I am using INDEX & MATCH to locate the first/last occurrence of Material based on your X value (Sand or not). INDEX & MATCH are used on the First & Last layers.

The Material Thickness calculations are using SUMPRODUCT() rather than SUMIFS(), which in my pea brain mind, is so much easier to 1) code and 2) intuitively understand. Total sand with in X & Y use SUMPRODUCT().

I've uploaded you workbook revised.

Here are the formulas for columns I, K & J:
From X to 1st layer:	
=IF
   (
    INDEX(Table1[Material],MATCH(G2,Table1[From],1),1)="Sand",
       MIN(H2-G2,INDEX(Table1[to],MATCH(G2,Table1[From],1),1)-G2),
       0
   )

Total sand with in X & Y:	
=SUMPRODUCT
  (
   (Table1[Thicknes (m)])*
   (Table1[Material]="Sand")*
   (Table1[to]<=H2)*
   (Table1[From]>G2)
  )

last layer available up to Y: 
=IF
  (
    AND(
        INDEX(Table1[Material],MATCH(H2,Table1[From],1),1)="Sand",
              MATCH(G2,Table1[From],1)<>MATCH(H2,Table1[From],1)
       ),
        H2-INDEX(Table1[From],MATCH(H2,Table1[From],1),1),
        0
  )
 


Let me know if I miss-interpreted your intentions or if you need an better explanation of what these expressions are doing.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Dynamic Summation in Excel formula

Hey, ShubhP, I think I answered all you questions a day after your last post.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Dynamic Summation in Excel formula

(OP)
Yes sir.
It helped a lot. Saved lot of time. I have added some filters in to it and works very well.

Many many thanks to you for the help & giving your time.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close