Copy the cell values of a column whose certain rows are hidden, to another sheet

Ian Y

New Member
Joined
Nov 18, 2023
Messages
37
Office Version
  1. 2019
Platform
  1. Windows
Here are two demonstrative sheets:

Demo1.xlsx
AB
1IDText
2zQmGwsBXVaLorem ipsum dolor sit amet. Consectetur adipiscing elit.
38tcbmfv2dlAliquam pulvinar tincidunt lorem vel cursus.
4U7km0cE1UV
5Lm3BK6UrpSPellentesque tincidunt purus nec. Enim molestie venenatis. Nunc tempor dapibus dui, sed tempor mi fermentum pretium.
6IOwCYwdCzP
January 7

Demo2.xlsx
AB
1IDText
2rUHBLBZZyc
3zQmGwsBXVa
4LxNNV0uEwx
5oiNo2eOZIU
6JV8n6HfJAE
78tcbmfv2dl
8q0hZR5UrGi
9CDFzs37XMd
10Lm3BK6UrpS
11JZxjBnip0M
January 8

In Demo1.xlsx, by using filter to hide row whose cells in column B are empty, I can copy other row's Text values all at once easily:

My question is, how do I fill in those copied Text values to the cells whose corresponding IDs are zQmGwsBXVa, 8tcbmfv2dl, and Lm3BK6UrpS, respectively in column B in Demo2.xlsx all at once easily? The order of rows is not to be worried about. In Demo2.xlsx, zQmGwsBXVa always appears before 8tcbmfv2dl, which always appears before Lm3BK6UrpS.

The two sheets are streamlined versions for demonstrative purposes. The actual sheets can contain more than 1,000 rows.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Upvote 1
Solution
@DanteAmor Thank you! This is the first time I try out VLOOKUP. I just pasted the formula into B2 and manually expand the range to B11, and then I got the successful result.

If Demo2.xlsx has 1,000 rows, is there an easier way to apply the range so that I don't need to manually expand the range to so many rows?
 
Upvote 0
If Demo2.xlsx has 1,000 rows, is there an easier way to apply the range so that I don't need to manually expand the range to so many rows?
Just copy the formula up to row 1000 or 2000.
😇
 
Upvote 0
is there an easier way to apply the range so that I don't need to manually expand the range to so many rows?
So I don't understand what you need.
In my example the formula goes from cell B2 to B11, if you need the formula up to cell B1000 then copy the formula from cell B2 to cell B1000.



=IFNA(VLOOKUP(A2,'[Demo1.xlsx]January 7'!$A:$B,2,0),"")
The formula covers the entire column A and B, it is not necessary to delimit the range up to cell 1000, since the formula covers the ENTIRE column.
;)
Is that what you need?
 
Last edited:
Upvote 0
So I don't understand what you need.
In my example the formula goes from cell B2 to B11, if you need the formula up to cell B1000 then copy the formula from cell B2 to cell B1000.



=IFNA(VLOOKUP(A2,'[Demo1.xlsx]January 7'!$A:$B,2,0),"")
The formula covers the entire column A and B, it is not necessary to delimit the range up to cell 1000, since the formula covers the ENTIRE column.
;)
Is that what you need?
After I pasted the formula into B2, I didn't see the expected result. I had to manually delimit the range up to B11 to see the expected result. What did I miss?
 
Upvote 0
After I pasted the formula into B2, I didn't see the expected result. I had to manually delimit the range up to B11 to see the expected result. What did I miss?
According to your example in B2 the result is empty, which is correct.
For it to work automatically you will have to create a macro that copies the formula downwards, but it seems to me that manually copying the formula downwards to B11 or B1000 is enough. I think it is not a complicated task.

Another option is to create a table, so when you put the formula in B2, it is automatically copied to the entire column.

:)
 
Upvote 0
I see. Thanks. My last question is that every time I open Demo2.xlsx, there is a dialog box asking me whether I want to update the link to get the latest data. Is it possible to disable that dialog?
 
Last edited:
Upvote 0
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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