Formulas in data validation range causing blanks

Stuepef

Board Regular
Joined
Oct 23, 2017
Messages
128
Office Version
  1. 2021
Platform
  1. Windows
I have a workbook where users can input job titles in two different ranges (A2:A6 & A8:A12). Only one range would be filled at a time, but I want to use one data validation list for both ranges without blanks showing up within the list. The problem is if I use formulas to generate the range for the list, it counts those cells and shows up as blanks. Is there a way to make a list that incorporates both ranges without blanks showing up in the list?

Workbook:
Code:
[TABLE="width: 199"]
<tbody>[TR]
[TD][/TD]
[TD]Job Title/Hours/Status[/TD]
[/TR]
[TR]
[TD="align: left"]A2[/TD]
[TD="align: left"]Officer[/TD]
[/TR]
[TR]
[TD="align: left"]A3[/TD]
[TD="align: left"]Part Time[/TD]
[/TR]
[TR]
[TD="align: left"]A4[/TD]
[TD="align: left"]Full Time[/TD]
[/TR]
[TR]
[TD="align: left"]A5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]A6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Job Title/Hours/Status[/TD]
[/TR]
[TR]
[TD="align: left"]A8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]A9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]A10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]A11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: left"]A12[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I made an IF statement to make one range on a different sheet to consolidate, but the formula that have blanks show up in the list since they aren't truly blank. Here is the formula used within the data validation list:
Code:
=OFFSET($G2,0,0,COUNTA($G:$G)-1,1)

Desired Result regardless of what range the information is in:
Officer
Part Time
Full time

Thank you for your help!

 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi,

See if this helps:




Book1
ABCDEFGHI
1Job Title/Hours/StatusJob Title/Hours/Status
2OfficerOfficerDV listTest
3Part TimePart Time
4Full TimeFull Time
5Test
6
7Job Title/Hours/Status
8Test
9Test
10
11
12
13
Sheet1
Cell Formulas
RangeFormula
D2{=IFERROR(IFERROR(INDEX($A$2:$A$6, MATCH(0, COUNTIF($D$1:D1, $A$2:$A$6)+($A$2:$A$6=""), 0)), INDEX($A$8:$A$13, MATCH(0, COUNTIF($D$1:D1, $A$8:$A$13)+($A$8:$A$13=""), 0))),"" )}
Press CTRL+SHIFT+ENTER to enter array formulas.

The list could potentially run from D2 till D12.

So i created a dynamic named range using this formula

=OFFSET(Sheet1!$D1,0,0,ROWS(Sheet1!$D$2:INDEX(Sheet1!$D$2:$D$12,SUMPRODUCT(--(Sheet1!$D$2:$D$12<>"")))),1)

Then enter the named range as a list in the data validation.

Here's a link to my example https://app.box.com/s/w88mnxo417tlue16i4rkomkzqzdc52sg
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,722
Members
449,465
Latest member
TAKLAM

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