[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

return multiple instance of a value in a rw

Hi experts,

I have an excel pivot table with 400+ columns designating a "storage bin location"
There are 1200+ rows designating unique "Item #'s"
The pivot table values designate qty stored in each bin location
An item # may appear in multiple bin locations in the pivot table

I need a formula or method for returning the bin location for the 1st instance of a qty >0, then return the bin location of 2nd instance where qty>0, then 3rd...to n possible locations. Upper limit of n likely can be assumed less than 20 possible locations.

I was thinking adding 20 columns at the end of the pivot table and using a hlookup to find qty values >0 and return bin location on top row of pivot table. Problem is telling column 2 to return the bin location of the 2nd instance in the row, then column 3 to return 3rd instance, etc.

Any help greatly appreciated.

Kevin

0
KevinHatt
Asked:
KevinHatt
  • 6
  • 5
1 Solution
 
Rory ArchibaldCommented:
For example:
=INDEX(1:1,SMALL(IF(3:3>0,COLUMN(3:3)),2))
array-entered will return the value from row 1 for the second value greater than zero in row 3. Is that what you meant?
0
 
KevinHattAuthor Commented:
Hi rorya,

I dont think so...

example:
                   [ Col1-Col2- Col3- Col4...Col400]    [Location1     Location2]...
item 123          4                5                                  Col1                Col3

does that make sense?

0
 
Rory ArchibaldCommented:
Yes, that's basically what the formula I posted does. If you just want the column number (rather than the contents of row 1, then use:
=SMALL(IF(3:3>0,COLUMN(3:3)),1) for the first item
=SMALL(IF(3:3>0,COLUMN(3:3)),2) for the second item
etc.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
KevinHattAuthor Commented:
apologies for being obtuse Rorya...I think you are correct, I'm just fighting syntax here. Can I ask for some specific syntax for the given data range?

Row that contains Bin location is row 4
qty values are located in range b5 to pc5

Also...when entering the array range, is it necessary to ctrl+shift+enter?
0
 
Rory ArchibaldCommented:
Yes it must be ctrl+ shift+ enter
Basically use
=INDEX(4:4,SMALL(IF(b4:pc4>0,COLUMN(b4:pc4)),2))
0
 
Rory ArchibaldCommented:
Yes it must be ctrl+ shift+ enter
Basically use
=INDEX(4:4,SMALL(IF(b5:pc5>0,COLUMN(b5:pc5)),2)
0
 
Rory ArchibaldCommented:
Correction:
=INDEX(B4:PC4,SMALL(IF(b4:pc4>0,COLUMN(b4:pc4)),2))
still array-entered.
0
 
KevinHattAuthor Commented:
Hi rorya,

Your help was most gratefully received Master Savant. Formulas working as they should,aand client happy.

Full points to be awarded, and thanks again!

Kevin
0
 
KevinHattAuthor Commented:
closed
0
 
KevinHattAuthor Commented:
closed
0
 
KevinHattAuthor Commented:
closed
0
 
TracyVBA DeveloperCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now