Take duplicate consecutive cell values and sum their offset?

lakaihigh

New Member
Joined
May 17, 2019
Messages
12
Good evening,

Generally I can figure most things out on my own but I seem to be struggling with this one.
Can anyone assist with a formula or vba code that can do the following:

I need to find consecutive duplicates in column (I) and get the sum of .offset(0,1) if .offset(0,2)="LTL"

To add reasoning and hopefully clarity to what I'm trying to accomplish; I have a set of Data with Locations and dates and unit totals. (Columns "I", "H", and "J" respectively). In order to know whether to consolidate them, the location must match, the dates must match, and the sum of units from column J must be > 1300. In the attached example, I have already changed font to red to indicate the individual locations would be consolidated as each set of locations has matching dates from column "H") And their total units sum above 1300. Currently I use an if(and(or formula in another column to check if the location and dates match and then I manually sum. So long story short I'm simply trying to combine all into one formula or script.

Example Image: (in this scenario I would need the sum of I2 to I4, the sum of I5 to I6, the sum of I7 to I8).

Any assistance would be greatly appreciated.
 

Attachments

  • example.png
    example.png
    35.7 KB · Views: 11

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top