Question

I would like to compute the sum of values inside the A cell, but the unfoturnate thing is that these cells also contain text in the format

  logvitprob=-49.5

Inside the document there can also be empty lines, like this:

 logvitprob=-58.2467                        
 (TOP (DT The)(DT-R (NN company)(NN-R (VBD said)(VBD-R (IN that)(IN-R (DT the)(DT-R (NN number)(NN-R (IN of)(IN-R (NN access)(NN-R (NNS lines)(NNS-R (VBD dropped)(VBD-R (RB slightly)(RB-R (IN in)(IN-R (DT the)(DT-R (NN quarter)(NN-R (DT a)(DT-R (NN decline)(NN-R (VBD attributed)(VBD-R (TO to)(TO-R (JJ seasonal)(JJ-R (NNS fluctuations)))))))))))))))))))))                        

 logvitprob=-39.201                     
(TOP (IN For)(IN-R (DT the)(DT-R (NN year)(NN-R (RB however)(RB-R (NN access)(NN-R (NNS lines)(NNS-R (IN in)(IN-R (NN service)(NN-R (VBP have)(VBP-R (VBN increased)(VBN-R (CD 5.5)(CD-R (NN %)))))))))))))                     

 logvitprob=-83.0381                        
 (TOP (NNP Chairman)(NNP-R (NNP D.H.)(NNP-R (NNP Hibbard)(NNP-R (VBD said)(VBD-R (DT the)(DT-R (NN company)(NN-R (VBZ has)(VBZ-R (VBN set)(VBN-R (DT a)(DT-R (JJ new)(JJ-R (CD five)(CD-R (NN year)(NN-R (NN goal)(NN-R (IN of)(IN-R (VBG doubling)(VBG-R (NNS revenues)(NNS-R (TO to)(TO-R (RB about)(RB-R (\$ \$)(\$-R (CD 1.8)(CD-R (CD billion)(CD-R (IN while)(IN-R (RB steadily)(RB-R (VBG increasing)(VBG-R (NN net))))))))))))))))))))))))))

 I could count the no of lines containing lovvit=smth with =COUNTIF(A1:A103976, "*logvitprob=*"), but how can I compute their sum? Many thanks!                     
Was it helpful?

Solution

Add a column to the right of your logvitprob... values. Write this formula:

=IFERROR(VALUE(RIGHT(A1,LEN(A1)-FIND("=",A1))),"")

Now that you have extracted your values (provided you have = symbol only in cells that matter) you can sum them up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top