ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Spacing with formulas (https://www.excelbanter.com/excel-discussion-misc-queries/199016-spacing-formulas.html)

pgarcia

Spacing with formulas
 
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

pgarcia

Spacing with formulas
 
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?

"pgarcia" wrote:

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


TomPl

Spacing with formulas
 
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)

"pgarcia" wrote:

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?

"pgarcia" wrote:

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



All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com