#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default I Need A Formula

I am working on an Excel sheet which has Amounts added in it and I want to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter Key
Stroke" So as to push the Values to next cell is is possible
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default I Need A Formula

I am working on an Excel sheet which has Amounts added in it and I want to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900


Does it have to be a formula or macro? Or are you just looking for a method
to break the cell up into individual cells one time?

If you need a formula or code solution, are the operations always additions
or could there be other math operations mixed in (multiplication,
subtraction, division, other)? Can the number of items being "added" vary?
Or will there always be 5 of them?

Here is the manual method to do what you asked. Select A1 and click
Data/TextToColumns from Excel's menu (if the cells next to A1 have data in
them, you will need to copy the contents of A1 to a cell where the cells to
its right are empty and do the following to that cell instead). On the
dialog that appears, select the Delimited option and click Next. Check the
CheckBox labeled "Other" and put a plus (+) sign in the fill-in field next
to it. Click the Finish button. Now, on the spreadsheet, select all of the
cells that were created and Copy them into the Windows Clipboard (Ctrl+C)
and then click into the A2 cell and select Edit/PasteSpecial from Excel's
menu, Now, put a check in the CheckBox labeled "Transpose" and click OK.
This will copy the cells to where you wanted. Finally, delete the cells in
row 1 that were created from A1.

Rick

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default I Need A Formula

Thanks rick / Jay
IN fact I was looking for a Method to split the contents in different cells
apology for my posting error

AS you asked me , the cell has only + or - operators and no * or / in it.
I tried something more tedious and it worked for the time being
I copied the content of the cell i.e =1500+500+300+100+500 into a word file
there I used find "+" replace Special paragraph break
and deleted the = sign
and then copied the content and pasted in Excel.

But yours is a more simple method

thanks Rick / Jay

"Rick Rothstein (MVP - VB)" wrote:

I am working on an Excel sheet which has Amounts added in it and I want to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900


Does it have to be a formula or macro? Or are you just looking for a method
to break the cell up into individual cells one time?

If you need a formula or code solution, are the operations always additions
or could there be other math operations mixed in (multiplication,
subtraction, division, other)? Can the number of items being "added" vary?
Or will there always be 5 of them?

Here is the manual method to do what you asked. Select A1 and click
Data/TextToColumns from Excel's menu (if the cells next to A1 have data in
them, you will need to copy the contents of A1 to a cell where the cells to
its right are empty and do the following to that cell instead). On the
dialog that appears, select the Delimited option and click Next. Check the
CheckBox labeled "Other" and put a plus (+) sign in the fill-in field next
to it. Click the Finish button. Now, on the spreadsheet, select all of the
cells that were created and Copy them into the Windows Clipboard (Ctrl+C)
and then click into the A2 cell and select Edit/PasteSpecial from Excel's
menu, Now, put a check in the CheckBox labeled "Transpose" and click OK.
This will copy the cells to where you wanted. Finally, delete the cells in
row 1 that were created from A1.

Rick


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default I Need A Formula

IN fact I was looking for a Method to split the contents in different
cells
apology for my posting error

AS you asked me , the cell has only + or - operators and no * or / in it.
I tried something more tedious and it worked for the time being
I copied the content of the cell i.e =1500+500+300+100+500 into a word
file
there I used find "+" replace Special paragraph break
and deleted the = sign
and then copied the content and pasted in Excel.

But yours is a more simple method


I am presuming by "yours is more simple method", you mean this macro
routine...

Dim X As Long
Dim Data() As String
Data = Split(Replace(Mid$(Range("A1").Formula, 2), "-", "+-"), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

that I last modified to handle plus and minus signs, right? The manual
method I first posted only works for a single user-specified delimiter and,
as such, would not handle both the plus and minus sign. I just want to be
clear on that as you posted your follow up in the manual method sub-thread
as opposed to the code method sub-thread.

Rick

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default I Need A Formula

It's not pretty, but I got it working - Paste this into a Standard module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False, Space:=False, _
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1), Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I want to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter Key
Stroke" So as to push the Values to next cell is is possible



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default I Need A Formula

No need to duplicate the manual method in code. Assuming the math operations
will always be addition (a question I have ask the OP to clarify), you could
use code something like this to do what the OP wants (again, assuming
**only** additions)...

Dim X As Long
Dim Data() As String
Data = Split(Mid$(Range("A1").Formula, 2), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick


"JMay" wrote in message
...
It's not pretty, but I got it working - Paste this into a Standard module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False, Space:=False,
_
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1), Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I want
to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter Key
Stroke" So as to push the Values to next cell is is possible


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default I Need A Formula

Rick,

That is pretty darn neat;
Thanks for furnishing..

Jim

"Rick Rothstein (MVP - VB)" wrote:

No need to duplicate the manual method in code. Assuming the math operations
will always be addition (a question I have ask the OP to clarify), you could
use code something like this to do what the OP wants (again, assuming
**only** additions)...

Dim X As Long
Dim Data() As String
Data = Split(Mid$(Range("A1").Formula, 2), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick


"JMay" wrote in message
...
It's not pretty, but I got it working - Paste this into a Standard module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False, Space:=False,
_
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1), Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I want
to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter Key
Stroke" So as to push the Values to next cell is is possible



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default I Need A Formula

Another variation along this theme.

Sub Demo()
Dim v
v = Split(Mid$([A1].Formula, 2), "+")
[A2].Resize(UBound(v) + 1).Value = _
WorksheetFunction.Transpose(v)
End Sub

--
Dana DeLouis


"JMay" wrote in message
...
Rick,

That is pretty darn neat;
Thanks for furnishing..

Jim

"Rick Rothstein (MVP - VB)" wrote:

No need to duplicate the manual method in code. Assuming the math
operations
will always be addition (a question I have ask the OP to clarify), you
could
use code something like this to do what the OP wants (again, assuming
**only** additions)...

Dim X As Long
Dim Data() As String
Data = Split(Mid$(Range("A1").Formula, 2), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick


"JMay" wrote in message
...
It's not pretty, but I got it working - Paste this into a Standard
module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False,
Space:=False,
_
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1),
Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I
want
to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter
Key
Stroke" So as to push the Values to next cell is is possible





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default I Need A Formula

Crap, you guys keep "raising-the-bar" ---------------
Thanks Dana - "really"

"Dana DeLouis" wrote:

Another variation along this theme.

Sub Demo()
Dim v
v = Split(Mid$([A1].Formula, 2), "+")
[A2].Resize(UBound(v) + 1).Value = _
WorksheetFunction.Transpose(v)
End Sub

--
Dana DeLouis


"JMay" wrote in message
...
Rick,

That is pretty darn neat;
Thanks for furnishing..

Jim

"Rick Rothstein (MVP - VB)" wrote:

No need to duplicate the manual method in code. Assuming the math
operations
will always be addition (a question I have ask the OP to clarify), you
could
use code something like this to do what the OP wants (again, assuming
**only** additions)...

Dim X As Long
Dim Data() As String
Data = Split(Mid$(Range("A1").Formula, 2), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick


"JMay" wrote in message
...
It's not pretty, but I got it working - Paste this into a Standard
module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False,
Space:=False,
_
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1),
Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I
want
to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter
Key
Stroke" So as to push the Values to next cell is is possible





  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default I Need A Formula

Thanks. Although the following is not a "bar raiser" like Dana's code was, I
thought you might find it an interesting extension to our previous postings.

Because the OP's original cell contained a summation, we can assume he will
likely add up the column of numbers that are created by our code. Since it
is possible for a summation to include negative numbers, I thought it would
be a good idea to extend the code to handle them. I am thinking of an
original cell content something like this...

=1500+500-300+100-500+900

where addition and subtraction are combined. A slight modification to one
line (it will also work for Dana's code) solves this problem. Here is my
revised code to handle plus an minus operations...

Dim X As Long
Dim Data() As String
Data = Split(Replace(Mid$(Range("A1").Formula, 2), "-", "+-"), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick



"JMay" wrote in message
...
Rick,

That is pretty darn neat;
Thanks for furnishing..

Jim

"Rick Rothstein (MVP - VB)" wrote:

No need to duplicate the manual method in code. Assuming the math
operations
will always be addition (a question I have ask the OP to clarify), you
could
use code something like this to do what the OP wants (again, assuming
**only** additions)...

Dim X As Long
Dim Data() As String
Data = Split(Mid$(Range("A1").Formula, 2), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick


"JMay" wrote in message
...
It's not pretty, but I got it working - Paste this into a Standard
module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False,
Space:=False,
_
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1),
Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I
want
to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter
Key
Stroke" So as to push the Values to next cell is is possible






  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default I Need A Formula

Rick, Thanks -- This Split function (VBA only) is working a miricle.
Data() is obvioulsy an string array that is catching the Split results

The only part that I can not get my head around is:
the replace portion..

Is replace llooking for "-" (a minus character) and replacing all with
a "+-" set of characters then the comma? and then the "+"

Can you verbalize what's going on here?

Thanks a million.....

Jim

"Rick Rothstein (MVP - VB)" wrote:

Thanks. Although the following is not a "bar raiser" like Dana's code was, I
thought you might find it an interesting extension to our previous postings.

Because the OP's original cell contained a summation, we can assume he will
likely add up the column of numbers that are created by our code. Since it
is possible for a summation to include negative numbers, I thought it would
be a good idea to extend the code to handle them. I am thinking of an
original cell content something like this...

=1500+500-300+100-500+900

where addition and subtraction are combined. A slight modification to one
line (it will also work for Dana's code) solves this problem. Here is my
revised code to handle plus an minus operations...

Dim X As Long
Dim Data() As String
Data = Split(Replace(Mid$(Range("A1").Formula, 2), "-", "+-"), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick



"JMay" wrote in message
...
Rick,

That is pretty darn neat;
Thanks for furnishing..

Jim

"Rick Rothstein (MVP - VB)" wrote:

No need to duplicate the manual method in code. Assuming the math
operations
will always be addition (a question I have ask the OP to clarify), you
could
use code something like this to do what the OP wants (again, assuming
**only** additions)...

Dim X As Long
Dim Data() As String
Data = Split(Mid$(Range("A1").Formula, 2), "+")
For X = 0 To UBound(Data)
Range("A1").Offset(X + 1, 0).Value = Data(X)
Next
Range("A1").Clear

Rick


"JMay" wrote in message
...
It's not pretty, but I got it working - Paste this into a Standard
module.
Before running the Macro - Select your Cell A1 (your = 1500+....) cell.

Jim

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 7/7/2007 by Jim May
'

'
Dim rrow As Integer
Selection.TextToColumns Destination:=ActiveCell.Offset(1,
0).Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter _
:=False, Tab:=False, Semicolon:=False, Comma:=False,
Space:=False,
_
Other:=True, OtherChar:="+", FieldInfo:=Array(Array(1, 1),
Array(2,
1), Array _
(3, 1), Array(4, 1), Array(5, 1)), TrailingMinusNumbers:=True
ActiveCell.Offset(1, 0).Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Selection.End(xlDown).Select
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"
Range("A2").EntireRow.Delete
Range("A1").Select

End Sub

"claude jerry" wrote:

I am working on an Excel sheet which has Amounts added in it and I
want
to
break it up into individual cells

Example in Cell A1 I have the following =1500+500+300+100+500
As such the final value shown in Cell A1 is 2900

Now I want this values to be splitted and shown in different cells
Eg A2 = 1500 , A3=500, A4=300, A5=100,A6=500 and Total in A7=2900

I dont know Much on VBA but was
trying to use Find Replace command to Replace all "+" with a "Enter
Key
Stroke" So as to push the Values to next cell is is possible




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"