Data Validation to not show blanks at the end

Godwin117

Board Regular
Joined
Dec 19, 2019
Messages
68
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have below formula, when I click ok after entering the formula into that data validation source, it shows the formula as the options and not the values that should be there. Not sure if anyone else has had an issue like this. Any help would be greatly appreciated.

=OFFSET(Data Validation!$K$2,,,COUNTA(Data Validation!$K:$K)-1)
 
That's it. Formulas will be counted in the CountA function

We need to use match and change the result of your formula so that it returns a zero instead of blank. If the last few formulas now result in a "", then change it so it results in 0.

This returns the the last text value in the column
=OFFSET('Data Validation'!$K$1,1,0,match("zzzzzzzzzzz",'Data Validation'!$K:$K)-1,1)
Thank you, that worked.
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Since you have Excel 365 then if yours has the FILTER function there is a considerably simpler way.

In the Data Validation sheet enter the function as shown in L2. The other results will automatically 'spill' to the following rows as required.

Godwin117 2020-04-21 1.xlsm
KL
1
2ABC
3ABCDEF
4GHI
5DEFJKL
6GHIMNO
7JKL
8
9
10MNO
11
Data validation
Cell Formulas
RangeFormula
L2:L6L2=FILTER(K2:K50,K2:K50<>"")
Dynamic array formulas.


In your Data validation cell(s) in the other worksheet you simply need to point the DV at the top cell in the new DV list we just created & add the # at the end as shown below.

Godwin117 2020-04-21 1.xlsm
A
1
2
Sheet1
Cells with Data Validation
CellAllowCriteria
A1:A2List='Data validation'!$L$2#


1587468492762.png
 
Upvote 0

Forum statistics

Threads
1,215,314
Messages
6,124,202
Members
449,147
Latest member
sweetkt327

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