Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-16
4
Medium Priority
?
317 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 2000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

783 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