Data Validation & Vloopup

dsubash

New Member
Joined
Nov 22, 2024
Messages
8
Office Version
  1. 2019
  2. Prefer Not To Say
Platform
  1. Windows
Hi,

I have a database in Sheet 1. Image below

Dummy.xlsm
ABCDEFG
1Sl. NoLocationName of EmployeeDateSalesCollectedDue
21SydneySELF01/11/20245005000
32SydneySELF01/11/2024243024300
43SydneySELF01/11/20245505500
54SydneySELF01/11/20243503500
9291IrelandTUV10/11/20241000100
9392IrelandTUV10/11/20241000100
9493IrelandTUV10/11/20241000100
139138JapanKLM12/11/20245605600
140139JapanKLM12/11/20241301300
141140JapanKLM12/11/202460600
142141JapanSELF13/11/20243203200
143142JapanSELF13/11/20241001000
160159TokyoTUV15/11/20241000100
161160TokyoTUV15/11/20241000100
162161TokyoTUV15/11/20241000100
163162TokyoTUV15/11/20241000100
183182DelhiSELF18/11/20241000100
184183DelhiSELF18/11/202470070
185184DelhiOWN18/11/20242800280
201200DelhiSELF18/11/20244000400
202201OhioKLM11/11/2024130010000
203202New JerseyAAA01/11/20245905900
204203New JerseyAAA01/11/202470070
205232OhioKKK11/11/20247507500
206233OhioKKK11/11/20241000100
207234OhioKKK11/11/20241000100
208235BangkokDEF01/11/20241501500
209236BangkokDEF01/11/202460600
210237BangkokDEF01/11/20241001000
211295BangaloreDEF11/11/20241001000
212296BangaloreDEF11/11/20241001000
213297BangaloreDEF11/11/20241001000
214298BangaloreDEF11/11/20241501500
215299BangaloreDEF11/11/20241001000
216300BangaloreDEF11/11/20243003000
Daily Transaction


For One criteria, I have used Name Manager in drop down list to select the Location in K1.

In L1 I tried using data validation drop down list with vlookup function. the code is based on the value in K1. I need the corresponding staff names attached to specific location only to be available in the drop down. (Image below)

Dummy.xlsm
ABCDEFGHIJKLM
1Sl. NoLocationName of EmployeeDateSalesCollectedDueLocationName of Employee
2I have used Data Validation using Name Manager for LocationI need to use Data Validation List using Vlookup so that only the names attached the the location to be displayed
3
4
5
6
7
8
9
10
11
12
Report


I tried the following code "=VLOOKUP(L2,'Sheet 1'!A2:B5706,2,0)" in Data Validation List option. It returned an error code stating ""The list source must be a delimited list, or a reference to a single row or column.""

Is there any way I can use Vlookup in data validation.

Please suggest.

Thanks in advance
Subash D
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
In L1 formula for DV.
Select DV-->list-->enter formula in source
Excel Formula:
=INDIRECT("D"&INDEX(ROW($D$2:$D$216),MATCH(K1,$C$2:$C$216,0))&":D"&INDEX(ROW($D$2:$D$216),MATCH(K1,$C$2:$C$216,0)+COUNTIF($C$2:$C$216,K1)-1))
 
Upvote 0
Dear Mr. Murthy,

Thanks for your response.

But, sorry, I have missed one point. My database sheet is in sheet 1 and I need the report in sheet 2.

How do i change the code?
 
Upvote 0
Use Helper cell, say in Report sheet O1. In O1
Excel Formula:
="'Daily Transaction'!D"&INDEX(ROW('Daily Transaction'!$D$2:$D$216),MATCH(K1,'Daily Transaction'!$C$2:$C$216,0))&":D"&INDEX(ROW('Daily Transaction'!$D$2:$D$216),MATCH(K1,'Daily Transaction'!$C$2:$C$216,0)+COUNTIF('Daily Transaction'!$C$2:$C$216,K1)-1)
For DV In L1 of Report sheet
=INDIRECT(O1)
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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