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.
 
After having success in testing the demonstrative sheets, I started to work on my actual sheets. However, after applying the same formula into my actual sheets, cells which are supposed to be empty contain 0 unwantedly. I don't know what caused the issue. I'm using the same software (Microsoft Excel 2019) on my same PC.

Anyway, I resorted to using the IF function and the formula became something like:

Code:
=IF(IFNA(VLOOKUP(A2,'D:\Administrator\Desktop\[Demo1.xlsx]January 7'!$A:$B,2,0),"")=0, "", IFNA(VLOOKUP(A2,'D:\Administrator\Desktop\[Demo1.xlsx]January 7'!$A:$B,2,0),""))

That worked and the 0s are gone, but the new formula looks a bit long-winded.

What could be the culprit of the issue? A is it possible to shorten the the new formula?
 
Upvote 0

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.
A is it possible to shorten the the new formula?

Note: The following formula works only when the result returned by the formula is text.


=IFNA(VLOOKUP(A2,'D:\Administrator\Desktop\[Demo1.xlsx]January 7'!$A:$B,2,0),"")&""


🫡
 
Upvote 1

Forum statistics

Threads
1,224,818
Messages
6,181,152
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