VLOOKUP Boggle

XLmom

New Member
Joined
Nov 16, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I have a workbook in which the first worksheet is a signup list where column B is populated with names as people are signed up. They are then manually assigned to a table which the corresponding table number is added to column A. I want a cell in a second worksheet to look through the values of first worksheet, column A and when it finds a the number, returned the text of first worksheet, column B into the cell of second worksheet.

In the attached workbook, the Leader worksheet contains the people signed up who are Mary (B2), Joy (B3) and Leslie (B4). I manually assigned their table numbers in column A.
On the student worksheet, the red shaded boxes are placeholders for the assigned leader's name. So for Student!M3 (which is table 4), for example, I would like it to search Leader!A2:A4 for the number 4 and then return the value in column B of that row. In this case it should return the name Mary.

I am missing something in my VLOOKUP formula and am just frustrated now so I truly appreciate the help!!!
Sample.xlsx
ABCDEFGHIJK
1Table #Leader NamePhoneEmailGuests# Reserved# Available# Paid# OwesSpecial Diet?Accessible?
24Mary888
31Joy888
45Leslie888
5Right click here and select insert row above to add new leader
6
7
8Total Leaders:424024024
Leader
Cell Formulas
RangeFormula
E2,E4E2=8
G2:G4G2=E2-F2
I2:I4I2=E2-H2
C8C8=COUNTIF(B2:B5, "*")
E8E8=SUMIF($E$2:$E$5,"<>")
F8,H8F8=SUM(F2:F5)
G8G8=SUMIF($G$2:$G$5,"<>")
I8I8=SUMIF($I$2:$I$5,"<>")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J2:K5Celldoes not contain a blank value textNO
I2:I5Cell Valuecontains "0"textYES
G2:G4Cell Value=0textYES
E2:E5Cell Value>8textNO
Cells with Data Validation
CellAllowCriteria
G2:G5Any value
I2:I5Any value
E2:E5Any value


Sample.xlsx
ABCDEFGHIJKLMNOPQRSTU
1
2GuestTableSeatGuestTableSeatGuestTableSeatGuestTableSeatGuestTableSeat
3
4#1#1#1#1#1
5#2#2#2#2#2
6#3#3#3#3#3
7#4#4#4#4#4
8#5#5#5#5#5
9#6#6#6#6#6
10#7#7#7#7#7
11#8#8#8#8#8
12
Student
Cells with Data Validation
CellAllowCriteria
A4:A12List=NamesUse
E4:E12List=NamesUse
I4:I12List=NamesUse
M4:M12List=NamesUse
Q4:Q12List=NamesUse
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
in column B put

=vlookup(A2,leader($A$2:$B$4,2,false)
 
Upvote 0
Recommend Making your table on the Leaders Tab a Table (Ctrl+T). It will fix your need to have the comment (Right-Click here and insert new row above...). Tables have Dynamic references and automatically will update if a new value is added below.

I recommend using XLOOKUP. I personally find it easier. But if you use VLookup, it would be
Excel Formula:
=VLOOKUP(N3,Leaders!A:B,2)
 
Upvote 0
Thank you for looking at this for me. I think my explanation might have been confusing. On the Student worksheet, I need a formula for A3, E3, I3 and M3 to populate those cells with information from the Leaders worksheet. A3 is table 1, E3 is table 2, I3 is table 3, and M3 would be table 4.

On the Leaders worksheet, I will manually assign the leader to a table and enter their assigned table in column A. In my example, I had assigned Mary to table 4 so back over on the Student sheet, the formula in M3 should have searched Leaders!Column A for who was assigned "4" and then return the corresponding name from Leaders!Column B. It is possible the tables I assign will change so that is why I was looking to do a VLOOKUP. Then if I later decided to switch Mary to table 2, Student!E3 would automatically reflect the change.

I tried =XLOOKUP("4",Leader!A2:A4,Leader!B2:B4,"",0,1) in Studetn!M3 and it didn't error out but it also didn't return the value of "Mary" which is what I am hoping for.
 
Upvote 0
well
that should work
=vlookup(A2,leader($A$2:$B$4,2,false)

"4" in inverted commas is text and so will not find 4

as will index/match
=index($B$2:$B$4,match(A2,Leader!$B$2:$B$4,0))


=XLOOKUP(A2,leader!$A$2:$A$4,leader!$B$2:$B$4,"",0,1)

all in the one sheet - so youy just add the sheet name to the range here

Book3
ABCDEFGH
1xlookupindex/matchvlookup
24marymarymary
34mary
Sheet1
Cell Formulas
RangeFormula
F2F2=XLOOKUP(E2,$A$2:$A$4,$B$2:$B$4,"",0,1)
G2G2=INDEX($B$2:$B$4,MATCH(E2,$A$2:$A$4,0))
H2H2=VLOOKUP(E2,$A$2:$B$4,2,0)
 
Upvote 1
Solution
Recommend Making your table on the Leaders Tab a Table (Ctrl+T). It will fix your need to have the comment (Right-Click here and insert new row above...). Tables have Dynamic references and automatically will update if a new value is added below.

I recommend using XLOOKUP. I personally find it easier. But if you use VLookup, it would be
Excel Formula:
=VLOOKUP(N3,Leaders!A:B,2)
I wrote my formula thinking that you would add the table number in B3,F3,J3,N3, etc.

XLOOKUP has a different formula layout in it but does the same thing. XLOOKUP has the following format:
Excel Formula:
=XLOOKUP(LOOKUP VALUE,LOOKUP ARRAY,RETURN ARRAY)

Also helpful in excel if you type in your formula and are having trouble, press F1
 
Upvote 0
Recommend Making your table on the Leaders Tab a Table (Ctrl+T). It will fix your need to have the comment (Right-Click here and insert new row above...). Tables have Dynamic references and automatically will update if a new value is added below.

I recommend using XLOOKUP. I personally find it easier. But if you use VLookup, it would be
Excel Formula:
=VLOOKUP(N3,Leaders!A:B,2)
Thank you for looking at this as well!
well
that should work
=vlookup(A2,leader($A$2:$B$4,2,false)

"4" in inverted commas is text and so will not find 4

as will index/match
=index($B$2:$B$4,match(A2,Leader!$B$2:$B$4,0))


=XLOOKUP(A2,leader!$A$2:$A$4,leader!$B$2:$B$4,"",0,1)

all in the one sheet - so youy just add the sheet name to the range here

Book3
ABCDEFGH
1xlookupindex/matchvlookup
24marymarymary
34mary
Sheet1
Cell Formulas
RangeFormula
F2F2=XLOOKUP(E2,$A$2:$A$4,$B$2:$B$4,"",0,1)
G2G2=INDEX($B$2:$B$4,MATCH(E2,$A$2:$A$4,0))
H2H2=VLOOKUP(E2,$A$2:$B$4,2,0)
YES!!!!!!!!!!! This worked. I was so close but not quite there. Thank you so much for helping me so I can carry on with building out this spreadsheet.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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