take and sort if

orsm6

Active Member
Joined
Oct 3, 2012
Messages
496
Office Version
  1. 365
Platform
  1. Windows
hi all - how can I expand on Fluff's formula to include to return the same ranges only if column E contains the text "shift 1"?

=TAKE(SORT(HSTACK(i43:i1501,d43:d1501),1,-1),5)

so still looks at top 5 times in column I
matches the times to the reason code in column D

but only gets the top 5 times for the text "shift 1" from column E


TIA
 
You still have not run the test I've asked about...to confirm that the formula-delivered "BOSCH" actually can match to a manually entered bosch. I would recommend de-constructing the formula to confirm that each part delivers something expected:
Your formula and the main data table are on the same worksheet, correct? In an empty column to the right of your data table, in row 43, enter this formula
Excel Formula:
=B43:B1501="bosch"
...what do you see?
Beside that formula, enter this:
Excel Formula:
=E43:E1501="shift 1"
Beside that, enter this:
Excel Formula:
=(B43:B1501="bosch")*(E43:E1501="shift 1")
...do you see a list of 1's and 0's and nothing else? And do the 1's correspond to the rows that you want?
To the right of those formula, on row 43, enter:
Excel Formula:
HSTACK(I43:I1501,D43:D1501)
...do you see the I and D column contents spill correctly?
Any issues with any of the results as you scroll down the sheet?
 
Last edited:
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You still have not run the test I've asked about...to confirm that the formula-delivered "BOSCH" actually can match to a manually entered bosch. I would recommend de-constructing the formula to confirm that each part delivers something expected:
Your formula and the main data table are on the same worksheet, correct? In an empty column to the right of your data table, in row 43, enter this formula
Excel Formula:
=B43:B1501="bosch"
...what do you see?
Beside that formula, enter this:
Excel Formula:
=E43:E1501="shift 1"
Beside that, enter this:
Excel Formula:
=(B43:B1501="bosch")*(E43:E1501="shift 1")
...do you see a list of 1's and 0's and nothing else? And do the 1's correspond to the rows that you want?
To the right of those formula, on row 43, enter:
Excel Formula:
HSTACK(I43:I1501,D43:D1501)
...do you see the I and D column contents spill correctly?
Any issues with any of the results as you scroll down the sheet?
i do very much appreciate your help.

I don't fully understand what you're looking for, but i have managed to get the results i needed by using column C. So I have still used your formula that you gave me.

many thanks again.
 
Upvote 0
You're welcome...glad you have it working.
 
Upvote 0

Forum statistics

Threads
1,215,147
Messages
6,123,297
Members
449,095
Latest member
Chestertim

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