Vlook up from a populated table

Shawn23

New Member
Joined
Mar 6, 2013
Messages
23
Hi,


I am new to excel, so please bare with me as I try to explain my problem =)


I made a userform where the user adds in their Name, ID Number, and Age. Those data are then saved into a table, named Table1, with three columns (Name, ID, Age) in a spreadsheet which I called Data Sheet. So everytime a new user enters their information, the table will populate. In the same exact spreadsheet, I have another table named, Table2, which has two columns (Name and ID). Table2 is also blank until Tabe1 has data. Its confusing but Im trying to make my program where a user enters their information, that information will be saved in Table1. Table2 then will get the information from Table1.


Here's my problem. I am able to copy the Name data from Table1 to Table2 using VBA but not the ID from Table2. So all I have in Table2 when a user enters their information, is their Name.


Could you use VLOOKUP to enter data into Table2 ID? Or how would you tackle this?


Thank you in advance!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Shawn,
Here is all you need to do. You do not need the VBA to copy from Sheet1 to Sheet2. A simple formula will do. Then copy down

A
B
1
NAME
ID
2
=Sheet1!A2
=Sheet1!B2

<tbody>
</tbody>
 
Upvote 0
Hi Kevin,

Thank you for the reply.

Table1 is filtered and auto populate when a user enters a new data in the userform
Name (filtered)ID (filtered)Age (filtered)
shawn12310
kevin45612

<tbody>
</tbody>



Table2 is filtered and autopopulate and update when a user enters a new data
Name (Filtered)ID (Filtered)
shawn (CELL:B3)Vlookup code entered here
kevin

<tbody>
</tbody>




My Table2 is not updating. I tried using your code. Table1 and Table2 is in the same spreadsheet.

I tried using this but it didnt work. Is it coded correctly?
=VLOOKUP($B$3,Table1[[Name]:[ID]],2,FALSE)

Thank you, again!
 
Upvote 0
Hi Kevin,

Thank you for the reply.

Table1 is filtered and auto populate when a user enters a new data in the userform
Name (filtered)
ID (filtered)Age (filtered)
shawn12310
kevin45612

<tbody>
</tbody>



Table2 is filtered and autopopulate and update when a user enters a new data
Name (Filtered)
ID (Filtered)
shawn (CELL:B3)Vlookup code entered here
kevin

<tbody>
</tbody>




My Table2 is not updating. I tried using your code. Table1 and Table2 is in the same spreadsheet.

I tried using this but it didnt work. Is it coded correctly?
=VLOOKUP($B$3,Table1[[Name]:[ID]],2,FALSE)

Thank you, again!

You do not need to use Vlookup. You can still use my formula except take out the Sheet1!.

B
CD
Name (filtered)
ID (filtered)Age (filtered)
3
shawn12310
4
kevin
456
12

<tbody>
</tbody>

Name (Filtered)
ID (Filtered)
=B3
=C3
=B4
=C4

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,933
Members
449,480
Latest member
yesitisasport

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