Solved

Excel Worksheet Function Help - Subtract first item from last item in grouping

Posted on 2011-03-16
4
311 Views
Last Modified: 2012-08-13
Hi Experts,

I have a spreadsheet that has grouped repeating numbers in column B.  There are times associated with those numbers.  I need the last number in the group minus the first number in the group to be in column M on the last row in that grouping.

Sounds confusing, but I've attached a spreadsheet to make it easier.  I know that I can do this with VBA but I would much rather use a formula.

Test.xlsm

Thanks
-Jeremy
0
Comment
Question by:FamousMortimer
  • 2
4 Comments
 
LVL 13

Expert Comment

by:Chris Raisin
ID: 35147376
What version of Excel are you using?
0
 
LVL 10

Author Comment

by:FamousMortimer
ID: 35147782
Forgot to mention... 2010
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35147933
Hello Jeremy, try this formula in M2 copied down

=IF(B2<>B3,L2-LOOKUP(2,1/(B$1:B1<>B2),L$2:L2),"")

see attached

regards, barry
26890495.xlsm
0
 
LVL 10

Author Closing Comment

by:FamousMortimer
ID: 35147994
Very nice, thanks a lot
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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