Vlookup - VBA code

Rbveiga

New Member
Joined
Sep 11, 2014
Messages
28
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</SPAN>
B</SPAN>
C</SPAN>
F</SPAN>
ABC123</SPAN>
ABC123</SPAN>
non ap</SPAN>
ABC123</SPAN>
cde </SPAN>
x</SPAN>
cde </SPAN>
x</SPAN>
cde </SPAN>
x</SPAN>
ABC123</SPAN>
ABC123


</SPAN>Regards,
Rbveiga

<TBODY>
</TBODY>

<TBODY>
</TBODY>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Input something like this in to column F and drag down?
Code:
=if(A2="ABC123", "non ap","")
 
Upvote 0
Hello Roderick

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

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

<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"
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

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