VLookup Not Returning Valid Value for All Items

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
338
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
I am working on a worksheet that has a Data Validation dropdown list that allows for Human Readable Funding Sources to be selected. Then using a VLookup to get the internal code for use in file naming conventions.

For each of the values in the FundingSource tab Column A. It is supposed to display the value of Column B in Column N of UpdateTimeSheets.
The only item that it does not work for is "B Student Employment" which for all the rows that use that value it returns #N/A instead of "BSEP" which is the code in the FundingSource sheet.

How can I get the B Student Employment to work?

_PREP_CleanUpFiles.xlsx
GHILMN
32B Student Employment1/26/20172/8/2017FY 2017FY 2017#N/A
33College Assistant11/17/201611/30/2016FY 2017FY 2017CA
34Other Tax Levy12/1/201612/14/2016FY 2017FY 2017NYS
35Federal Work Study12/15/201612/28/2016FY 2017FY 2017FWS
UpdateTimeSheets
Cell Formulas
RangeFormula
L32:L35L32=IF(LEN(TRIM($A32))>0,(IF(AND(NOT(ISBLANK(H32)),NOT(ISBLANK(I32))),IF(J32=K32,CONCAT("FY ",J32),"#$MixedPeriod$#"),IF(AND(LEN($C32)>3,OR(ISBLANK($H32)),ISBLANK($I32)),"#",""))),"")
M32:M35M32=IF(LEN(TRIM($A32))>0,L32,"")
N32:N35N32=VLOOKUP($G32,FundingSource!A:B,2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M3:M14992Expression=$M3="#$MixedPeriod$#"textNO
M3:M14992Expression=AND(LEN(TRIM($M3))<5,LEN(TRIM($C3))>=4)textNO
Cells with Data Validation
CellAllowCriteria
M32:M35List=TimeSheetFYFolderList!$A$1:$A$24



_PREP_CleanUpFiles.xlsx
AB
1
2College AssistantCA
3Federal Work StudyFWS
4Other Tax LevyNYS
5B Student EmploymentBSEP
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FundingSource
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You need to specify the final argument in the vlookup like
Excel Formula:
=VLOOKUP($G32,FundingSource!A:B,2,0)
 
Upvote 0
Solution
You need to specify the final argument in the vlookup like
Excel Formula:
=VLOOKUP($G32,FundingSource!A:B,2,0)
Thank you... just curious why only the B Student Employment value was not working while the College Assistant, Other Tax Levy and Federal Work Study values all worked as expected.
 
Upvote 0
Because you were doing an approximate the data must be sorted A-Z & all the other values are in alphabetical order.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,817
Members
449,049
Latest member
cybersurfer5000

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