ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to copy a VLOOKUP formula - Data with a filter on (https://www.excelbanter.com/excel-programming/440909-macro-copy-vlookup-formula-data-filter.html)

Maria

Macro to copy a VLOOKUP formula - Data with a filter on
 
Hello,

I was wondering if somebody could help me with this macro€¦

I have some data with a filter on, so that only the rows with blank cells
are showing.
I want to enter a VLOOKUP in the cell, and copy it down to all the blank
cells. I tried just recording a macro, but when I run the macro it doesnt
work.

Any ideas of how to do it?

Example:

1)
Before the filter:

Colums A -B - C
A x x - 1st Row
A - 2nd Row
A x x - 3rd Row
A - 4th row
A x x - 5th row

2)
After the filter (filter €“ blanks):

Colums A -B - C
A - 2nd Row
A - 4th row

3)
Enter VLOOKUP in A2,B2 and copy it down to B4 and C4

Hope I made sense...

Thanks!




All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com