How do you take (A1) 123456xxxx and pull out the last four digits from another cell such as (A2) 887890, grabbing just the 7890 - result of 1234567890, or even better, 123-456-7890?
1 Answer
=LEFT(A1,3)&"-"&MID(A1,4,3)&"-"&RIGHT(A2,4)
For further information on how any of the three Excel functions LEFT, RIGHT and MID work, have a read of this.
-
1Where does this formula go? We're looking for long answers that provide some explanation and context. Don't just give a one-line answer: please explain why you're recommending it as a solution and how to implement it. Jan 10, 2013 at 15:58
-
2Sorry, thought it was obvious given the Excel context. This is a formula which can go in any cell to give you the output requested. For further information on how any of the three Excel functions LEFT, RIGHT and MID work, have a read of this: techrepublic.com/article/… Jan 10, 2013 at 16:02
-
No reason to be sorry. I am just trying to help you give more complete answers. It is a good idea not to assume anything. Think about the people who will read this a question; will readers understand how to apply your answer? Jan 10, 2013 at 16:13