Vlookup

VbaHell

Well-known Member
Joined
Jan 30, 2011
Messages
1,220
Hello all
I would like to know if there is some VBA code that can remove zero's from a column. I am trying to code a vlookup against two spreadsheets but the one sheet has zero's and the other does not. below is an example on the difference but I need to keep any zero's after the first number if that makes sense ie 32304 need to keep this zero


00004567 4567
00032304 32304
00234340 234340
01234398 1234398
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Given this dummy vlookup formula...

=VLOOKUP(Sheet1!A1,Sheet2!D:E,2,FALSE)

Which part has the leading 0's? Red or Blue?
 
Upvote 0
I should have been clearer in my question.

Sheet1 A1 has 00004567 and sheet2 A1 has 4567
The Vlookup would be from sheet2 selecting 4567 then matching up with sheet1 00004567 and droping the answer into sheet2 column B1
 
Upvote 0
Hi I am still having a problem


Tab1

Cell A1 Cell B1
00004342


Tab2
Cell A1 Cell B1
4342 21/8/11

I need to vlookup Tab1 Cell A1 against Tab2 Cell A1 and drop Cell B1 back into Tab1 Cell B1

Sorry to be a pain but the answer coming back is n/a and I think it's because of the 0000 in Tab 1
 
Upvote 0

Forum statistics

Threads
1,224,561
Messages
6,179,521
Members
452,923
Latest member
JackiG

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