# Vlookup - VBA code

#### Rbveiga

##### New Member
Good afternoon,

Could you please help me?

I am interested to automatized my spreadsheet and I need a formula for Vlookup. I need to book the information "non ap" on column B without changing the "x" of colmun B

All the time which appear the information ABC123 on column "A" should appear the information "non ap". I cretaed the VBA formula, however the Vlookup is changing also the "x" from collumn "B", which I wish do not change it

 A B C F ABC123 ABC123 non ap ABC123 cde x cde x cde x ABC123 ABC123 Regards, Rbveiga

<TBODY>
</TBODY>

<TBODY>
</TBODY>

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
Input something like this in to column F and drag down?
Code:
``=if(A2="ABC123", "non ap","")``

Hello Roderick

Thank you for your reply, however didn't work =(
I have the spreadsheet like below:

 A B C D E F KREF+3003123456 non ap KREF+300 non ap KREF+3003987894465 non ap BFI 000 non ap KREF+30039879879879 non ap 123456 0 123456 0 asdfg 0 qwer 0 zxcv 0 yuiop 0 KREF+30039879879879 non ap KREF+3003654645 non ap KREF+30036546546 non ap KREF+30036546546 non ap KREF+30036546546 non ap KREF+3003321312 non ap BFI 00012346789 0 BFI 000123456789456 0

<TBODY>
</TBODY><COLGROUP><COL><COL span=3><COL><COL></COLGROUP>

I am using this formula: =IF(ISNA(VLOOKUP(LEFT(A:A,8),E:E:F:F,2,FALSE)),,VLOOKUP(LEFT(A:A,8),E:E:F:F,2,FALSE)), but it is not wrorking because are changing the values for 0 insted of skip ths cell and also is not pick up the other "non ap"- "BFI 000"

Replies
11
Views
389
Replies
3
Views
824
Replies
1
Views
605
Replies
9
Views
388
Replies
2
Views
137

Threads
1,221,519
Messages
6,160,298
Members
451,636
Latest member
ddweller151

### 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

### 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