Named range for data validation incorrectly including blank value

cart0250

Active Member
Joined
Jun 24, 2006
Messages
293
Office Version
  1. 2016
Platform
  1. Windows
Good day,

I'm using the below for a named range for data validation. This allows user to select from the values in Column A of Sheet1, starting at row 2.
However, its adding a blank selection option at the bottom of the drop down, apparently including 1 row below the last used row in Column A.
Therefore the user is incorrectly allowed to input a blank value.

Is there a way to modify this to only include the used range in Col A (starting at row 2). There are no blank cells mixed in the list (i.e., first blank cell is after the final value in Col A).

Excel Formula:
=OFFSET('SHEET1'!$A$2,0,0,COUNTA('SHEET1'!$A:$A),1)
 
How about
Excel Formula:
=OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,1)
 
Upvote 0
It works for me, so can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
It works for me, so can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
I got it working. However, even though it no longer allows user to select a blank from the list (and 'ignore blanks' is unchecked), it still allows blank entries. So I'll have to work that piece out. Anyway, thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,226,901
Messages
6,193,577
Members
453,808
Latest member
EBERHARDTJOEY

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