View Single Post
  #3   Report Post  
Héctor Miguel
 
Posts: n/a
Default Text string and sum

hi, michaelp !

... 2 columns one with a string of numbers and the other a number
1,-,-,-,-,-,-,-,-,- 247
-,2,-,-,-,-,-,-,-,- 34
-,-,3,-,-,-,-,-,-,- 34
-,-,-,4,-,-,-,-,-,- 24
-,-,-,-,5,-,-,-,-,- 2608
-,-,-,-,-,6,-,-,-,- 2
... search the range of text string to find lets say the number 2
(the numbers appear in the same position every time or is replaced with the - )
then sum the next column that relates to the number 2 etc [...]


I'm not so sure if comma is part of the string, and if you want to 'sum'... or 'add' to the next column :D
you may want to try with...
op1: =substitute(substitute(a1,"-",""),",","")+b1
op2: =--(substitute(substitute(a1,"-",""),",","")&b1)

hth,
hector.