+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    08-03-2007
    Posts
    5

    Unhappy Summing variable data across rigid boundaries

    I apologize if the title is not clear.

    Its been a long while since ive used excel i am really struggling with what might be a basic problem, and im hopping someone here may be able to help... i shall proceed...

    I shall use a basic example to illustrate my problem - see attached - as the spreadsheet im actually working on is huge and contains sensitive data.

    So,

    In the spreadsheet attached, the problem is: I am mowing the grass of a football pitch and getting paid by the m3 of grass i mow. however i'm getting paid more when i mow at greater distances - defined by certain 'reaches'. so i need to know how many m3 ive mowed in each reach.

    I make a note of where I start on the pitch and where i end, and also how much grass i mow.

    so im looking for a solution that is intelligent enough to distinguish where Ive taken grass from and how much, given that i know where i started, where i finish and how much i take.

    I know this is long winded but ive been struggling with this all morning and getting know where

    any help much much appreciated
    Attached Files Attached Files
    Last edited by LHUK; 06-19-2009 at 08:45 AM.

  2. #2
    Forum Moderator dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003 & 2007
    Posts
    3,661

    Smile Re: Summing variable data across rigid boundaries

    Good morning LHUK

    I'm not sure if I've fully grasped what you want to do here, but have a look at the spreadsheet attached. I've added a UDF to your sheet, which you'll need to allow macros for it to work. This will count the yellow squares within each of your boundaries and return the number of yellow squares.

    I think this is the direction we need to go in, but let me know if I'm barking up the wrong tree.

    HTH

    DominicB
    Attached Files Attached Files
    Now available : Ultimate Add-In 2007
    Integrates directly into the Office Excel Ribbon


    Download Ultimate Add-In v1.52 from www.dom-and-lis.co.uk
    90+ Utilities, 200+ Sub utilities last updated 25th April 2008
    Free!!

  3. #3
    Registered User
    Join Date
    08-03-2007
    Posts
    5

    Re: Summing variable data across rigid boundaries

    Good morning to you!

    Thanks for taking the time to help.

    yeah i guess i didn't fully explain myself. the yellow boxes were just an illustration of my problem. the bottom line is, its all about splitting up the volume correctly.

    I've attached a modified example: where basically I have 2 Tables.

    table 1 = my data.

    table 2 = how i want to change the data.

    (in table 2 Ive hand calc'd it so you can see what i mean....it seems like such a simple problem from the outset but its doing my head in lol. )

    Again thank you so much for your bother.

    Leigh
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-03-2007
    Posts
    5

    Re: Summing variable data across rigid boundaries

    Does anyone know if this is even do-able within excel?

    otherwise Ill stop wasting my time and give up!

    Thanks,

    Leigh

  5. #5
    Valued Forum Contributor
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2003
    Posts
    270

    Re: Summing variable data across rigid boundaries

    Try this,

    G8
    Code:
    =IF(AND(G$6>=$D8,G$6<=$E8),$F8/($E8-$D8+1),"")
    copied down to P13.

    U17
    Code:
    =SUM(OFFSET($G$8,0,Q17-1,10,R17-Q17+1))
    copied down to U20.

    You can also see attached file.

    Hope this helps,
    windknife
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-03-2007
    Posts
    5

    Re: Summing variable data across rigid boundaries

    Thanks for the replies,

    like i said : i really shouldn't have put the yellow boxes in there!!! lol they were JUST a visual depiction of what i was trying to calc numerically in my 'real' spreadsheet.

    anyway thanks for the inspiration

    Ive used a whole bunch of IF AND statements to crack this nut, and I have since learned that Excel can handle a max of 7/8 per cell??!! so i had to use 2 columns.

    column1 formula:

    =IF(AND($D13=$AI$41,$E13=$AS$41),$F13,(IF(AND($D13<$AI$41,$E13>$AS$41),$F13*(($AS$41-$AI$41)/($E13-$D13)),(IF(AND($D13>$AI$41,$E13<$AS$41),$F13,(IF((AND($D13=$AI$41,$E13<$AS$41)),$F13,(IF((AND($D13<$ AI$41,$E13>$AI$41,$E13<$AS$41)),$F13*(($E13-$AI$41)/($E13-$D13)),(IF((AND($D13<$AI$41,$E13=$AS$41)),$F13*(($E13-$AI$41)/($E13-$D13)),I13)))))))))))

    hidden column 2:

    =IF(AND($E13=$AS$41,$D13<$AS$41,$D13>$AI$41),$F13,IF(AND($D13>$AI$41,$D13<$AS$41,$E13>$AS$41),$F13*( ($AS$41-$D13)/($E13-$D13)),IF(AND($D13=$AI$41,$E13>$AS$41),$F13*(($AS$41-$D13)/($E13-$D13)),0)))

    attached is my solved example for those interested.

    Thanks and take care,

    Leigh
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0