Spacing with formulas

P

pgarcia

Hello all,
I have the following data. I need to get the first set of data, then the 2nd
set and then 3rd. The problem is that the data will not be consistent, as you
can see below. Now, the data is gather with a formula, (1st formula)
=OFFSET(A1, MATCH("Line#Number AmountReason For Difference",A:A, FALSE), 0,
1,1), (2nd formula) =LEFT(B158,1), then (3rd formula, final)
=IF(C158="1",B158,""). I know that you can use “text to column†and have it
put in the cell next to the original data, but is there a formula that I can
use? I would like to avoid using a VB code for this (my user are not to
savvy).

1 4210210 134.40
2 30362920 395.40
3 820401-2 116.20
4 728435514 152.06
5 820401-1 194.57
6 820501-1 365.90
7 42111438 158.50

End results is such:
1. 4210210 $134.40
2. 30362920 $395.40
3. 820401-2 $116.20
4. 728435514 $152.06
5. 820401-1 $194.57
6. 820501-1 $365.90
7. 42111438 $158.50

Thanks
 
P

pgarcia

Ok, so I found this two fomulas but have a problem with it.
=RIGHT(B158,(FIND(" ",B158)+5))

=LEFT(RIGHT(B158,LEN(B158)-FIND(" ",B158)),LEN(RIGHT(B158,LEN(B158)-FIND("
",B158)))-6)

How can I have the last number be dynamic and not static?
 
T

TomPl

Replace:
=RIGHT(B158,(FIND(" ",B158)+5))
With:
=Value(Mid(B158,(FIND(" ",B158)),256))

Replace:
=LEFT(RIGHT(B158,LEN(B158)-FIND(" ",B158)),LEN(RIGHT(B158,LEN(B158)-FIND("
",B158)))-6)
With:
=LEFT(B158,FIND(" ",B158)-1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top