Solved

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

Posted on 2011-03-16
4
309 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
Comment Utility
What version of Excel are you using?
0
 
LVL 10

Author Comment

by:FamousMortimer
Comment Utility
Forgot to mention... 2010
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
Comment Utility
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
Comment Utility
Very nice, thanks a lot
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
My experience with Windows 10 over a one year period and suggestions for smooth operation
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now