COPY TEXT FROM COLUMN G IN 1 WORKBOOK TO ANOTHER WORKBOOK IF CELL IN COLUMN IS SAME

xenios

Board Regular
Joined
Sep 4, 2020
Messages
91
Office Version
  1. 2016
Platform
  1. Windows
Hi All!

If there is a change the following can be done.

Have 2 workbooks

1 has names in column A, and comments in Column G, H... in 1 workbook
Need to copy comments in column G, H... where text in column A is the same to another workbook ( or can be to another sheet if not possible in different workbook).

Attached example.
1 - initial file
2 - next file

Thank you!
 

Attachments

  • 1.png
    1.png
    6.8 KB · Views: 6
  • 2.png
    2.png
    6.9 KB · Views: 7

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi, cannot give you an exact answer without knowing the book and sheet names.

VLOOKUP is an option. And good to know in general.

 
Upvote 0
Hi, cannot give you an exact answer without knowing the book and sheet names.

VLOOKUP is an option. And good to know in general.

Thank you, looking at the vlookup.

The book names are always different.
So I can make in 2 sheets then.
HOTELS AND HOTELS1
 
Upvote 0
It can be different books.

=VLOOKUP(A2,Hotels!A:B,2,0) for B2
=VLOOKUP(A2,Hotels!A:C,3,0) for C2

If you select the columns after typing in =VLOOKUP(A2, it will populate the name of the book and sheet
 
Upvote 0
It can be different books.

=VLOOKUP(A2,Hotels!A:B,2,0) for B2
=VLOOKUP(A2,Hotels!A:C,3,0) for C2

If you select the columns after typing in =VLOOKUP(A2, it will populate the name of the book and she

Does it work if the 1 list have more items than the other.
Lets say on the first one I have 50 names on the second 70?
 
Upvote 0
Does it work if the 1 list have more items than the other.
Lets say on the first one I have 50 names on the second 70?
Can you please write me an example when it's one excel sheet as cant get it how to use it. :(
 
Upvote 0
It works no matter how big the lists. I'll try and explain the process but a tutorial video is probably best.

Say I want to look for value A2 in sheet1, I want to match that with a value in column A in sheet2 and return the value in column C next to that.

In Sheet1, row 2 somewhere.

Type =VLOOKUP(

then select A2 and type a comma.

then click on sheet2 and click on column A and hold down the mouse button and drag it to column C, the formula bar should now say =VLOOKUP(A2,Sheet2!A:C

type a comma again.

now since column C is the 3rd column from A (including A) type a 3 and another comma.

most of the time you want an exact match, so type FALSE or 0 next and close the bracket.

this should give you =VLOOKUP(A2,Sheet2!A:C,3,0)


If you get a N/A result, there is no match. A 0 means it found a match but there is no value in C (unless it is 0)
 
Upvote 0
It works no matter how big the lists. I'll try and explain the process but a tutorial video is probably best.

Say I want to look for value A2 in sheet1, I want to match that with a value in column A in sheet2 and return the value in column C next to that.

In Sheet1, row 2 somewhere.

Type =VLOOKUP(

then select A2 and type a comma.

then click on sheet2 and click on column A and hold down the mouse button and drag it to column C, the formula bar should now say =VLOOKUP(A2,Sheet2!A:C

type a comma again.

now since column C is the 3rd column from A (including A) type a 3 and another comma.

most of the time you want an exact match, so type FALSE or 0 next and close the bracket.

this should give you =VLOOKUP(A2,Sheet2!A:C,3,0)


If you get a N/A result, there is no match. A 0 means it found a match but there is no value in C (unless it is 0)
Thank you! Made it to work :) The thing is it takes the details also only if nuber of the row matches in both sheets, in my case it's rarely same, Is there a way to get the result when the information is not in the same row?
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,616
Members
449,238
Latest member
wcbyers

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