Data Validation Drop Down - Formula

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
950
Office Version
  1. 2019
Platform
  1. Windows
I have column A with entries and column B where some rows have the value "J".

I want to create a data validation drop down list formula which only shows entries in column A which have the value "J" in column B.

Can't figure it out... any help please?

many thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Off to the side or you can put it on a different/hidden sheet. put this formula in. This is an array formula and must be committed with CTRL+SHIFT+ENTER.
Code:
=IF(ROWS(J$1:J1)>COUNTIF($B$2:$B$18,"j"),"",INDEX($A$2:$A$18,SMALL(IF($B$2:$B$18="j",ROW($B$2:$B$18)-ROW($B$2)+1),ROWS($J$1:J1))))

In the next column assuming you put the array formula in J1
Code:
=LEN(J1)

Copy both formulas down.

In data validation choose list and use this formula
Code:
=OFFSET(J1,0,0,COUNTIF(K1:K18,">0"))
 
Upvote 0
hmm ok, this is very helpful though a bit cumbersome, I was assuming there would be an easier way out!
 
Upvote 0
ok I managed to do it in the end! but is it possible to sort the results alphabetically with the array formula or do I need to do this in another column ?

many thanks again
 
Upvote 0

Forum statistics

Threads
1,215,963
Messages
6,127,964
Members
449,414
Latest member
sameri

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