Hi Folks,
I'm trying to create a spreadsheet that will look to see if a cell starts with a certain number and then it should look within the cell to see if it contains a "-" (dash) and display a result depending on whether there is a dash in it or not.
A bit more in depth,
The data provided is normally an 8 digit number beginning with a 2 (e.g. 23456789), however, sometimes it can be a number that begins with a 3 and typically contains a (dash) followed by a further two digits (e.g. 34567890-12). I need to be able to search for anything that begins with a 3 and display anything before the dash in one cell and anything after the dash in another cell.
So far I've been using the below formulas to get this:
=IF(LEFT(B3,1)="3",LEFT(B3,8),"")
=IF(LEFT(B3,1)="3",RIGHT(B3,2),"")
However, some of the data I'm using appears to not have a dash and the digits that should follow it which is causing my formulas to show incorrect results. What I'm wanting to do is search in the cell to see if it contains a dash and if it does pull through the data from after that dash into the cell, but if it doesn't then enter "10" into the cell.
I've attached a copy of the spreadsheet I've been using.
Hope someone can help! and that this actually makes sense!
L.
Test.xls
Bookmarks