Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL-Insert a table into another sheet

Status
Not open for further replies.

snoopy80

Technical User
Jun 27, 2001
106
Hi Everyone,
I have a workbook that has 3 worksheets with sheet1 has a small blank table in it. Now let say in sheet 2 I have:
column A Column B
12345 s
23456
11111 s
22233
22222 s (the s in B means selected)
Whenever, column B has a "s" (selected), the values should be pasted to sheet 3 and table in sheet1 also pasted. The sheet 3 should look like this
12345
then the table from sheet1

11111
then the table from sheet1

22222
then the table from sheet1
How can this be done? I have tried to use the logical function IF but I could not obtain the result correctly. I may not have the function set up correctly. Aprreciate your HELPS.
 
You should use the VLOOKUP function to achieve your goal here...

Swap column A and B so that the "s" is in column A and the numbers are in column B

then use this:

=VLOOKUP("s",tablename,2,FALSE)

This is what that does:

It goes to a cell range named tablename (name whatever you want) and looks down the first column for a "s". When it finds that it inserts the value in the 2nd column.


Hope that helps,

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top