Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7960093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:40:24+00:00 2026-06-04T04:40:24+00:00

I have a worksheet UserEntry with 2 columns, Block and Address . I want

  • 0

I have a worksheet UserEntry with 2 columns, Block and Address. I want to validate both of these based on another worksheet Validation with the same column names. The data on the Validation sheet is as follows:

Block | Address
---------------
001   | 101
001   | 101.3
001A  | 35
020-1 | 203
020-1 | 203.5
020-1 | 204.1

...

There are about 11000 different blocks, and about 40000 block/address pairs.

My goal is that if a user enters a value into the Block column on the UserEntry sheet, the drop-down choices in the Address column change to correspond with that Block.

I tried using Custom validation with this formula:

=VLOOKUP(UserEntry!A2,Validation!A2:B40000)

But that evaluated to an error. I saw some solutions in various forums that involved setting named ranges and then having the VLOOKUP() search for the appropriate named range, but it seems like that won’t work here because I’d have to create 11000 named ranges.

How can I make the validation drop-down for Address include all the values corresponding to a given Block value?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:40:25+00:00Added an answer on June 4, 2026 at 4:40 am

    You didn’t mention VBA but here is a solution that uses it.

    Step 1

    Create a master table of Block-Address relationships. Make sure this is sorted on Block. I used Sheet1:

    Master Table

    Cell E2 is important. You don’t actually have to put anything there, but the macro will use it. Cell E3 is for show only, but you will use the formula (which is commented out here so you can see it) momentarily.

    Step 2

    Create a named range. The formula in Refers to: is what you saw in E3 above, and you can see the reference to cell E2 here. The formula for your convenience is

    =OFFSET($A$1,MATCH($E$2,$A:$A,0)-1,1,COUNTIF($A:$A,$E$2),1)
    

    Dynamic Range

    Step 3

    Set up a new worksheet (Sheet2) where the data entry will happen. Create data validation for the Address column as shown.

    enter image description here

    Step 4

    Open the VBA editor and paste this code in the module for Sheet2. You can remove the Debug statement if you wish. Again note the reference to cell E2 on Sheet1:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      Debug.Print "fired on " & ActiveCell.Address
      If Not Application.Intersect(Target, Range("B:B")) Is Nothing Then
        Sheets("Sheet1").Range("E2").Value = ActiveCell.Offset(0, -1).Value
      End If
    End Sub
    

    Step 5

    Enjoy. Your data validation is now context sensitive. Examples:

    enter image description here
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VBA macro that copies rows from one worksheet into another based
I have a worksheet with around 3,000 rows. One of these columns contains ethnicity
I have a worksheet that spans multiple pages, both vertically and horizontally. It has
I have 2 worksheets, I need to update with data from another worksheet I
I have an Excel worksheet where the user enters certain data, which I want
I have an excel worksheet with columns A, B, C...columns A and B have
I have a worksheet with 2 columns Key and Value. by VBA code, i
I have a need to copy a worksheet from one workbook into another and
I have an excel worksheet with 2 comboboxes, and 3 scrollbars. I want to
I have a worksheet with many rows/columns like so: How can I only copy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.