Dropping Zeros, But In A Formula?

GGeck68

New Member
Joined
Jan 22, 2009
Messages
6
Hello Everyone,

I know from time to time we have all dealt with excel issues involving the program dropping leading zeros, but this case is a first for me.

In order to monitor account numbers in a spreadsheet, I would like to setup a formula as follows:

=IF(OR(A1=TR002,A1=TR050),"Yes","No"))

However upon hitting ENTER, excel automatically drops the zeros from the formula to read:

=IF(OR(A1=TR002,A1=TR050),"Yes","No"))

Unfortunately TROO2 and TR050 in this example cannot be changed as they are static account numbers.

If anyone has ideas on how I can correct this, I would be extremely grateful!
 
Weird. In 2007 it trims out the zeros. If I load 2007 in compatibility mode, the TR005 doesn't drop the zeros (it gives me a #NAME? error). If I "upgrade" the sheet to 2007 I get the following warning: "The name, TR005, either conflicts with a valid range reference or is invalid for Excel". This is using the formula =TR005 in A1.

I don't have 2003 on my work machine, but I'm going to stand by my guess that Excel is interpreting TR005 as a cell reference and that is why it's dropping the 00(zero zero) from your formula.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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