If I have the following in Cell A1 "30, 20, 10"
How do I add those numbers to put in line B1?
Thanks in advance
If I have the following in Cell A1 "30, 20, 10"
How do I add those numbers to put in line B1?
Thanks in advance
Well, a roundabout way would be:
1. Go Insert>Name>Define and enter a name like SumLeft and in the RefersTo box type:
=EVALUATE(SUBSTITUTE(OFFSET(INDIRECT("RC",FALSE),0,-1),",","+"))
(including = sign at beginning) and click OK
2. in B1 type
=SumLeft
and press return
Entering =SumLeft in a cell will always sum the contents of the cell to its immediate left where it contains a string of numbers separated by commas.
Hope this helps!
Richard
Last edited by Richard Schollar; 03-02-2007 at 05:05 PM.
Do those number have to all stay in A1? If it were me, I would parse A1 into columns (Data->Text to columns work through text import wizard), then B1=sum(A1:C1)
Yes, all those numbers do have to stay in A1.
I tried to use the "SumLeft" approach and came up with this '#VALUE!'
Please help!!
Thanks
This should help
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks VBA Noob![]()
Should have done that myself to begin with...
Richard
No problem.
Nice formula by the way
VBA Noob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks