justtryingtolearn
New Member
- Joined
- Mar 9, 2018
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
Hi Everyone,
If you’re reading this, thank you.
BACKGROUND
My role at my company requires of me to report the most currentprices stored in our databases. Sometimes I get requests to pull prices forproducts that first billed several quarters ago. The challenge with this is thefact that the price for a given product often changes from quarter to quarter.
So say for example I got asked to report the price onProduct X. When these requests come in, Product X is all that is known. So I’llgo to our databases, look up Product X, and I’ll see multiple prices spread outover multiple quarters like so (columns are named A-D to make referencingeasier later on):
[TABLE="width: 472"]
<tbody>[TR]
[TD="width: 156, bgcolor: transparent"] [/TD]
[TD="width: 156, bgcolor: transparent"] [/TD]
[TD="width: 162, bgcolor: transparent"] [/TD]
[TD="width: 156, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="width: 156, bgcolor: transparent"] Product X
[/TD]
[TD="width: 156, bgcolor: transparent"] 5.50
[/TD]
[TD="width: 162, bgcolor: transparent"] 20182
[/TD]
[TD="width: 156, bgcolor: transparent"] 20184
[/TD]
[/TR]
[TR]
[TD="width: 156, bgcolor: transparent"] Product X
[/TD]
[TD="width: 156, bgcolor: transparent"] 6.00
[/TD]
[TD="width: 162, bgcolor: transparent"] 20182
[/TD]
[TD="width: 156, bgcolor: transparent"] 20183
[/TD]
[/TR]
[TR]
[TD="width: 156, bgcolor: transparent"] Product X
[/TD]
[TD="width: 156, bgcolor: transparent"] 5.00
[/TD]
[TD="width: 162, bgcolor: transparent"] 20182
[/TD]
[TD="width: 156, bgcolor: transparent"] 20182
[/TD]
[/TR]
</tbody>[/TABLE]
These results say that Product X was first billed in 2ndquarter of 2018 at $5.00. In 3rd quarter of 2018, the price changedto $6.00. Then it changed again in 4th quarter of 2018 to $5.50.
When I go to report the price on Product X, I’m only interestedin reporting whatever the price was the last time it was updated. So for thatmatter, I only want to include the top row of these results in my report.
However, requests come in for sometimes tens or hundreds ofproducts. And, as you can imagine, the amount of prices associated with each ofthose products can balloon fast.
So far I’ve been using a manual-heavy process where I exportall my results into excel and start manually deleting all the rows that have amore recent, updated price. I repeat until I’m left with one price for everyproduct. It may get the job done, but it exposes me to too much risk for humanerror than I’m comfortable with, not to mention all the time it takes tocomplete. I need to automate.
WHAT I NEED
For a given product, I need to get Excel to notice all itsquarters in Column D that share the same quarter in Column C, then determinethe greatest value in Column D, and finally report that entire row of data.
WHAT I’VE TRIED
My attempts to automate this process via Excel formulae havethus far been discouraging. I seem to be stuck in limbo where I’m not surewhich formulae to use or in what combination.
I’ve tried a few combinations of CONCATENATE with VLOOKUP—thinkingmaybe I could concatenate C and D, and then VLOOKUP D and return B. I’ve alsotried using combinations of IF with MAX—thinking maybe I could nest IF in MAX todetermine what the max value in Column D was for every row that shared the samevalue in Column C. I’ve also looked online and have read about but don’tunderstand INDEX or MATCH, so not sure if those would help me either.
Basically, I’m lost. I feel like I’m circling something, butam just not able to put it all together without someone saying, “Hey dummy,this is what you need to do.” So I’m really hoping the good people on thisforum can help me out and teach me some valuable Excel lessons along the way.
Thanks everybody! It’s hard to believe a forum like thisexists J
If you’re reading this, thank you.
BACKGROUND
My role at my company requires of me to report the most currentprices stored in our databases. Sometimes I get requests to pull prices forproducts that first billed several quarters ago. The challenge with this is thefact that the price for a given product often changes from quarter to quarter.
So say for example I got asked to report the price onProduct X. When these requests come in, Product X is all that is known. So I’llgo to our databases, look up Product X, and I’ll see multiple prices spread outover multiple quarters like so (columns are named A-D to make referencingeasier later on):
[TABLE="width: 472"]
<tbody>[TR]
[TD="width: 156, bgcolor: transparent"]
Product (A)
[TD="width: 156, bgcolor: transparent"]
Price (B)
[TD="width: 162, bgcolor: transparent"]
The Quarter the Price was Originally Billed (C)
[TD="width: 156, bgcolor: transparent"]
The Quarter the Price was Updated (D)
[/TR]
[TR]
[TD="width: 156, bgcolor: transparent"] Product X
[/TD]
[TD="width: 156, bgcolor: transparent"] 5.50
[/TD]
[TD="width: 162, bgcolor: transparent"] 20182
[/TD]
[TD="width: 156, bgcolor: transparent"] 20184
[/TD]
[/TR]
[TR]
[TD="width: 156, bgcolor: transparent"] Product X
[/TD]
[TD="width: 156, bgcolor: transparent"] 6.00
[/TD]
[TD="width: 162, bgcolor: transparent"] 20182
[/TD]
[TD="width: 156, bgcolor: transparent"] 20183
[/TD]
[/TR]
[TR]
[TD="width: 156, bgcolor: transparent"] Product X
[/TD]
[TD="width: 156, bgcolor: transparent"] 5.00
[/TD]
[TD="width: 162, bgcolor: transparent"] 20182
[/TD]
[TD="width: 156, bgcolor: transparent"] 20182
[/TD]
[/TR]
</tbody>[/TABLE]
These results say that Product X was first billed in 2ndquarter of 2018 at $5.00. In 3rd quarter of 2018, the price changedto $6.00. Then it changed again in 4th quarter of 2018 to $5.50.
When I go to report the price on Product X, I’m only interestedin reporting whatever the price was the last time it was updated. So for thatmatter, I only want to include the top row of these results in my report.
However, requests come in for sometimes tens or hundreds ofproducts. And, as you can imagine, the amount of prices associated with each ofthose products can balloon fast.
So far I’ve been using a manual-heavy process where I exportall my results into excel and start manually deleting all the rows that have amore recent, updated price. I repeat until I’m left with one price for everyproduct. It may get the job done, but it exposes me to too much risk for humanerror than I’m comfortable with, not to mention all the time it takes tocomplete. I need to automate.
WHAT I NEED
For a given product, I need to get Excel to notice all itsquarters in Column D that share the same quarter in Column C, then determinethe greatest value in Column D, and finally report that entire row of data.
WHAT I’VE TRIED
My attempts to automate this process via Excel formulae havethus far been discouraging. I seem to be stuck in limbo where I’m not surewhich formulae to use or in what combination.
I’ve tried a few combinations of CONCATENATE with VLOOKUP—thinkingmaybe I could concatenate C and D, and then VLOOKUP D and return B. I’ve alsotried using combinations of IF with MAX—thinking maybe I could nest IF in MAX todetermine what the max value in Column D was for every row that shared the samevalue in Column C. I’ve also looked online and have read about but don’tunderstand INDEX or MATCH, so not sure if those would help me either.
Basically, I’m lost. I feel like I’m circling something, butam just not able to put it all together without someone saying, “Hey dummy,this is what you need to do.” So I’m really hoping the good people on thisforum can help me out and teach me some valuable Excel lessons along the way.
Thanks everybody! It’s hard to believe a forum like thisexists J