2014-02-20 87 views
0

我想計算出細胞內值的總和,但unfoturnate的是,這些細胞也含有格式文本Excel中SUMIF函數細胞也含有一些文本值

logvitprob=-49.5 

內那裏的文檔也可以是空行,如下所示:

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!      
+0

對於這個例子,'logvitprob = -58.2467'是整個單元格的內容,還是同一單元格的下一行部分? –

回答

1

在您的logvitprob...值的右側添加一列。寫這個公式:

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

現在你已經提取的值(前提是你有=符號,僅在重要細胞),你可以總結起來。