If function to extract a number from a cell

Ozzie2842

New Member
Joined
Jan 16, 2009
Messages
35
Hello,
I have a column with the year that an employee was hired. I'm attempting to include a column with the decade the employee was hired, e.g., Year Hired is 1981, the decade would then be 1980. I'm using this formula, but I keep getting a "False" result. Please help me find my error.

CELL B2 - 1981
CELL D2 - 1980

=IF(LEFT(B2,3)="8",$D$2,"FALSE"))
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about...

=IF(MID(B2,3,1)="8",$D$2,FALSE)

You could use this an eliminate putting 1980 in cell D2

=IF(MID(B2,3,1)="8",(LEFT(B2,3)&0)+0,FALSE)
 
Upvote 0
Hello,
I have a column with the year that an employee was hired. I'm attempting to include a column with the decade the employee was hired, e.g., Year Hired is 1981, the decade would then be 1980. I'm using this formula, but I keep getting a "False" result. Please help me find my error.

CELL B2 - 1981
CELL D2 - 1980

=IF(LEFT(B2,3)="8",$D$2,"FALSE"))
Another way...

=FLOOR(B2,10)
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

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