Forum Discussion
Formula with multiple conditions
Hello!! I am not tech savvy and need help creating an Excel formula to lighten my workload. Here is what I want to do: whatever the beginning ticket number sequence is in B2 would populate C2 as corresponding truck number. I would do this in cells B2-130 and C2-130. Is this possible and if so, can someone please help me? I would appreciate it so much! Thank you
If Cell B has 295414 as the 1st sequence of numbers, then Cell C=295414
If Cell B has 295415 as the 1st sequence of numbers, then Cell C=295415
If Cell B has 541894 as the 1st sequence of numbers, then Cell C=541894
If Cell B has 541895 as the 1st sequence of numbers, then Cell C=541895
Is this possible and can someone please help me out? I would appreciate it so much!! Thank you! Chantel
- KerryCopper Contributor
Seems a pretty simple problem if I am understanding the issue. Use the Find function to find the first dash "-" and then use Left function to extra the first sequence of numbers. So the Formula in C2 is:
=Left(B2,Find(B2,"-")-1
)
- KerryCopper Contributor
=Left(B2,Find(B2,"-")-1)
- Chantel6576Copper Contributor
Thank you for responding!! I copied that formula and put into C2 and nothing happened when I input ticket numbers. Any advice?
If Ticket# parts always have the same length you may simply use in C2
=LEFT( B2, 6 )
and drag it down.
If formula not recalculate the value please check if you are in automatic mode
- PeterBartholomew1Silver Contributor
=REGEXEXTRACT(ticket, "\w+")