Formula excludes displayed leading zeros

Joined
Jan 13, 2021
Messages
20
Office Version
  1. 2007
Platform
  1. Windows
{=LOOKUP(2,1/("0"=LEFT(B:B,1)),A:A)}

The above formula doesn't catch on to the leading zeros that are displayed in B:B cells. I understand that making B:B cells with custom formatting as 00 only displays the leading zeros for me to see but I want to make Excel include those zeros when using formulas. How?

I tried {=LOOKUP(2,1/("0"=LEFT(TEXT(B:B,1)),A:A)} but that doesn't work.

Please help, 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"
Upload picture with your data and show expected result.

Select Range("B1:B100000") then in tab NUMBER choose TEXT
 
Upvote 0
How about
Excel Formula:
=LOOKUP(2,1/(B2:B100<>"")*("0"=LEFT(TEXT(B2:B100,"00"),1)),A2:A100)
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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