Insert Vlookup into auto filter #N/A cells

excel_2009

Active Member
Joined
Sep 14, 2009
Messages
318
Hi Excel gurus,

I have the following issue and was wondering if someone could help me. I have columns of data but there are some #N/A's in column C and D, if there is an NA in column C then there will always be an NA in column D. I would like to place a vlookup for all NA cells in column D and the value that is looked up to be populated into column C.

I have the following so far but it partially works because the data always changes so it needs to be updated so that it is more dynamic:

Code:
   Range("c2").Select   Selection.AutoFilter
   ActiveSheet.Range("C:C").AutoFilter Field:=3, Criteria1:="#N/A"
   Range("C26").Select
   ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[1],'Categories'!C[-2]:C[-1],2,0)"
   Selection.FillDown
   Range("C2").Select
   Selection.AutoFilter

I hope this makes sense?

Thank you!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,216,030
Messages
6,128,413
Members
449,449
Latest member
Quiet_Nectarine_

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