Dynamic Data Validation list without dispersed blanks

julhs

Active Member
Joined
Dec 3, 2018
Messages
471
Office Version
  1. 2010
Platform
  1. Windows
I am wondering if I have completely misunderstood the use of “Offset,Count” for my purposes but should have gone with using ActiveX combobox instead?

I have 2 validation lists on my source sheet, one for “Supplier” ColB (which has loads of dispersed blank rows) and the other in ColC for “Chemical Name”.
My ultimate goal will be to make the “Chemical Name” list dependent on selection made in the “Supplier” list, but at the moment that is not my issue.

I’m using this in the DV list source in ColB (Supplier)
Rich (BB code):
=OFFSET($B$6,0,0,COUNTA($B:$B),1)
and this as the source in ColC (Chemical Name)
Rich (BB code):
=OFFSET($C$6,0,0,COUNTA($C:$C),1)

Firstly, neither of the 2 validation lists are complete (seems they are getting chopped off part way down)
Secondly (and only referring to) “Supplier” list, it still contains all the blank rows
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Green filled cells are where Validation drop downs are
The Red filled cells in ColB & C are where each Validation List is being cut off

aaasa
asaasa
Supplier Chemical Name
SupplierChemical Name
HUTCHINGSONSEnvision
Envision
Stacto
Glyco phosp + wetter
Grazon 90
Pastor
New Shot
Headland Relay
Mircam Plus
Cassoron G
Dictabenal(Cassaron equiv)
Panacide M
E 11 (wetting agent)
Iron
Round up Pro Active
Round up Pro Active(Gold)
Pistol (residual)
Espom Salt
Depitox
Finalsan Plus (Total)
Activator 90
Mentor (RoundUp equiv)
Sherriff AmenityKatoun Gold (Total)
Praxys
Flatline
Pistol (residual)..
Katana (residual)
Valdor Flex (residual)
Activator 90..
Ferromex
Grazon 90 Pro..
Glenside
(Richard Salmon)Sea Green Liqiud Iron
BIOtechnica
(Croptec Ltd -Algaflex
Martin Noble)
ViveGreenMossOff
ALS
(Amenity Land Pistol (residual)…
Solutions)Round up Pro Active..
Soluble Iron
AvoncropBlazon ( Blue die)
Vitax Tank Cleaner
RBT 24/7 Moss & Algae killer
Oakland -Intek Opal Green
Amenity
T H WhitesRose Clear
Armallatox
Grazon 90,,
Patio MajicPatio Majic
WyevaleDithane ( pack of 6)
Rose Clear (£ 8.96 for 150ml)
Tack shopEpsom Salts
Rigby TaylorMascot Soluable Iron
 
Upvote 0
My intial thought on this is that COUNTA counts non blank cells. So if you have 26 non blank cells you only get the first 26 items returned with the OFFSET function.
 
Last edited:
Upvote 0
Well I sort of follow that to a point because in Col B there are 22 blank rows between first & second entry in the column with 2 blank rows below 2nd entry, but not 26 in total.
But using an adjusted Offset/Count formula for Col C validation list, there are only 12 blank rows before the list is cut off?
 
Upvote 0
the 3rd argument of OFFSET is the height amount. If you want to find the LAST cell in the column that has a value in it, COUNTA will not work because there are only 22 (or 24, or 26... it makes no difference) populated cells.

You need to build a "helper" range that has no blanks. (Office 365 Insiders (Current Version) actually filters duplicates out of DV ranges so youi don't need helper columns.)

This is how I would construct the DV list in a helper column:

(additionally, if you're going to have lots of complex formulas, using a column reference like $B:$B will slow your worksheet down, epecially if OFFSET is a volatile function).

Mr Excel Questions 71.xlsm
ABCDE
1aaasa
2asaasa
3Supplier Chemical Name
4SupplierChemical Name
5
6HUTCHINGSONSEnvision HUTCHINGSONS
7EnvisionSherriff Amenity
8StactoGlenside
9Glyco phosp + wetter (Richard Salmon)
10Grazon 90BIOtechnica
11Pastor (Croptec Ltd -
12New Shot Martin Noble)
13Headland RelayViveGreen
14Mircam PlusALS
15Cassoron G (Amenity Land
16Dictabenal(Cassaron equiv) Solutions)
17Panacide MAvoncrop
18E 11 (wetting agent)RBT 24/7
19IronOakland -
20Round up Pro Active Amenity
21Round up Pro Active(Gold)T H Whites
22Pistol (residual)Patio Majic
23Espom SaltWyevale
24DepitoxTack shop
25Finalsan Plus (Total) 
26Activator 90 
27Mentor (RoundUp equiv) 
28 
29Sherriff AmenityKatoun Gold (Total) 
30Praxys 
31Flatline 
32Pistol (residual).. 
33Katana (residual) 
34Valdor Flex (residual) 
35Activator 90.. 
36Ferromex 
37Grazon 90 Pro.. 
38 
39Glenside  
40 (Richard Salmon)Sea Green Liqiud Iron 
41 
42BIOtechnica 
43 (Croptec Ltd -Algaflex 
44 Martin Noble)
45
46ViveGreenMossOff
47
48ALS
49 (Amenity Land Pistol (residual)…
50 Solutions)Round up Pro Active..
51Soluble Iron
52
53AvoncropBlazon ( Blue die)
54Vitax Tank Cleaner
55
56RBT 24/7 Moss & Algae killer
57
58Oakland -Intek Opal Green
59 Amenity
60
61T H WhitesRose Clear
62Armallatox
63Grazon 90,,
64
65Patio MajicPatio Majic
66
67WyevaleDithane ( pack of 6)
68Rose Clear (£ 8.96 for 150ml)
69
70Tack shopEpsom Salts
71
72Rigby TaylorMascot Soluable Iron
73
Sheet5
Cell Formulas
RangeFormula
E6:E43E6=IF(ROWS($B$6:$B6)>COUNTA($B$1:$B200)-5,"",INDEX($B$1:$B200,1/AGGREGATE(14,,IFERROR(1/((LEN($B$6:$B$200)>0)*(ROW($B$6:$B$200))),0),ROW(E6)-5)))
 
Last edited:
Upvote 0
Solution
Thank you.
Yet again I find that IF I updated my Excel 2010 I would find life a lot easier!!!
What you have said just shows again my lack of in-depth knowledge.

I had inserted a manually populated column of suppliers (so no blanks) to reference but just thought I was completely missing something basic regarding a straight Offset/CountA VD list.
What you have given me (un-test in my real time) would do away with that manually populated column of suppliers. Adapted; the same goes for “Chemical Name’s” in col:C, but as you can see there is only a one line blank between what product one supplier provides and the start of what the next supplier provides.
Any blanks that exist in col:C will not be relevant when I get the right way to make Col C VDlist dependent on col:B VDlist selection.

I know this is NOT part of the initial question!!
But just as a closing question (and ONLY meant as a tip); do you think that using individually named ranges of chemicals that each supplier provides the way to go when creating the dependent drop down list for col:C (ie col:B VB list selection should only display relevant products in col:C Vb list)?
Or should I be looking at an other way?
 
Upvote 0
I don't really understand your question. My initial thought is that you need to have a way to identify all the components in C that match with B. Since B has spaces, how are you associating the C records with their "parent" records? My suggestion would be to fill the blanks in Column B with repeated values.

But I think you want a data validation list that is dynamicly filtered and based on adjacent cells, is that correct?
There are a few youtube channels that have all posted videos on Dynamic Validation. But, I do not know how effective they are in older versions of Excel. Although 2010 has much that is transferable between users these days (365 and 2021 may not be very ubiquitous).

ExcelIsFun, Mr Excel, Leila Gharani, and MyOnlineTrainingHub all have great video tutorials.

Just search "MS-Excel, Dynamic Data Valadation"

Here is one video that probably works with 2010.

 
Upvote 0
Sorry if my supplementary question was not clear.
But with what you have provided me I will attempt to link Col B selections to Named ranges for associated “Chemical Names” in Col C.
If I’ts any help, for instance
Hutchingsons supply the chemicals listed in B6:B27
Sherriff Amenity B29:B37

Many thanks for your help, you have enabled me to move forward from the log jam I was at.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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