Need help with a function to chose the correct number out of 2 numbers in one cell based on criteria

duusomething

New Member
Joined
Jul 2, 2014
Messages
2
Hello,

I'm working on a spreadsheet that has a reference table with this information:
PartProcessEmployeeDateTimeSizeSerial No:Carton Weight
10366/10367L23MFG06/24/149:58:26AM6435
10366/10367L23MFG02/17/148:57:38PM6436

<tbody>
</tbody>

What I need help with is creating a formula to add into one of my existing vlookup formulas that will automatically select the part as being either 10366 or 10367 based on the date that it has. For example, if the date is prior to 02/20/14 I would need it to select the part as being 10366. If the date is after 02/20/14 I would need it to select the part as being 10367. Is there a formula that will allow me to do this without having to split up the text?

Thanks for your help!

Duusomething
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Are the part numbers always 5 digits ??
If so, try
Code:
=IF(D2<2/20/14,LEFT(A2,5),IF(D2>2/20/14,RIGHT(A2,5),""))
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,844
Members
449,411
Latest member
adunn_23

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