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:[TABLE="width: 500"]
<tbody>[TR]
[TD]Part[/TD]
[TD]Process[/TD]
[TD]Employee[/TD]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Size[/TD]
[TD]Serial No:[/TD]
[TD]Carton Weight[/TD]
[/TR]
[TR]
[TD]10366/10367[/TD]
[TD]L23[/TD]
[TD]MFG[/TD]
[TD]06/24/14[/TD]
[TD]9:58:26AM[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]435[/TD]
[/TR]
[TR]
[TD]10366/10367[/TD]
[TD]L23[/TD]
[TD]MFG[/TD]
[TD]02/17/14[/TD]
[TD]8:57:38PM[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]436[/TD]
[/TR]
</tbody>[/TABLE]

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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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