Solution required.....formula or macro?

Ahmed Fawad

Board Regular
Joined
Mar 1, 2011
Messages
63
Office Version
  1. 2016
Platform
  1. Windows
I need help on the following:
if it can be done by formula or I need a macro?

What will be the formula or the macro?


75137_428735457187386_420770582_n.jpg
 
Could you use a filter, or pivot table to show this?
A filter would work ok, if you didn't have too many products, whereas a pivot table would automate this without the need of formulas or macros.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I'm using 2010

I2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX($C$2:$C$20,SMALL(IF($A$2:$A$20=$F2,
  IF(ISNUMBER($D$2:$D$20),IF($D$2:$D$20>0,ROW($C$2:$C$20)-ROW($C$2)+1))),
   ROWS($I$2:I2))),"")

Note that this formula does not use the description in G2 as a condition.

If G2 must be used as a condition...

I2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX($C$2:$C$20,SMALL(IF($A$2:$A$20=$F2,
  IF($B$2:$B$20=$G2,IF(ISNUMBER($D$2:$D$20),IF($D$2:$D$20>0,
   ROW($C$2:$C$20)-ROW($C$2)+1)))),ROWS($I$2:I2))),"")

AutoFilter or Advanced Filter are other options with which the same results can be obtained.
 
Upvote 0

Forum statistics

Threads
1,223,107
Messages
6,170,137
Members
452,304
Latest member
Thelingly95

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