ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Match question (https://www.excelbanter.com/excel-programming/432513-match-question.html)

Alberta Rose

Match question
 
Could someone help me with this. I want to sum until a certain cost
code/cost type and then stop. this cost code/cost type may be in line 40 of
one worksheet, but row 49 on another, etc. Am I correct in assuming I could
use the match function to stop at the specified cost code/cost type?

JP Ronse

Match question
 
Hi Alberta,

SUMIF should do it.

Wkr,

JP
"Alberta Rose" wrote in message
...
Could someone help me with this. I want to sum until a certain cost
code/cost type and then stop. this cost code/cost type may be in line 40
of
one worksheet, but row 49 on another, etc. Am I correct in assuming I
could
use the match function to stop at the specified cost code/cost type?




Gary''s Student

Match question
 
Consider cols A & B containing:

CD168 96
CD82 73
CD355 86
CD485 82
CD178 65
CD403 81
CD43 80
CD136 93
CD115 68
CD62 79
CD138 51
CD457 65
CD197 65
CD243 81
CD225 70
CD153 64
CD40 84
CD456 67
CD453 93
CD120 75
CD314 67
CD130 51
CD413 62
CD415 56
CD43 62
CD285 60
CD13 68
CD109 55
CD124 70
CD158 84

and we want to sum col B down to CD40 (row#17)

=SUM(INDIRECT("B1:B" & MATCH("CD40",A:A,0)))
will display 1283

This is because the MATCH() give us the 17.
--
Gary''s Student - gsnu200860


"Alberta Rose" wrote:

Could someone help me with this. I want to sum until a certain cost
code/cost type and then stop. this cost code/cost type may be in line 40 of
one worksheet, but row 49 on another, etc. Am I correct in assuming I could
use the match function to stop at the specified cost code/cost type?



All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com