Sum specific word in a column

kojak43

Active Member
Joined
Feb 23, 2002
Messages
270
I want to make a checkbook register that will sum the number of times the word "Check" appears in a column. Once that number is known, I will add it to the original check number. So, if A3="Check" then the value in B3 will be B2+1.
.....A..................B
2......................1000
3 Check..............1001
4 Deposit
5 Check..............1002
6 Withdrawal
7 Check..............1003

Is this possible?

k
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Use an expand range (Note the $ signs in the formulas):

Sheet1

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>A</TD><TD>B</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>Title</TD><TD>Value</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>Check</TD><TD style="TEXT-ALIGN: right">1000</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>Deposit</TD><TD> </TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>Check</TD><TD style="TEXT-ALIGN: right">1001</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>Deposit</TD><TD> </TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">6</TD><TD>Deposit</TD><TD> </TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">7</TD><TD>Check</TD><TD style="TEXT-ALIGN: right">1002</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">8</TD><TD>check</TD><TD style="TEXT-ALIGN: right">1003</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD>check</TD><TD style="TEXT-ALIGN: right">1004</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">10</TD><TD>deposit</TD><TD> </TD></TR></TBODY></TABLE>
<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; FONT-SIZE: 10pt; BORDER-LEFT-STYLE: groove; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>B3</TD><TD>=IF(UPPER($A3="CHECK"),MAX($B$2:$B2)+1,"")</TD></TR><TR><TD>B4</TD><TD>=IF(UPPER($A4="CHECK"),MAX($B$2:$B3)+1,"")</TD></TR><TR><TD>B5</TD><TD>=IF(UPPER($A5="CHECK"),MAX($B$2:$B4)+1,"")</TD></TR><TR><TD>B6</TD><TD>=IF(UPPER($A6="CHECK"),MAX($B$2:$B5)+1,"")</TD></TR><TR><TD>B7</TD><TD>=IF(UPPER($A7="CHECK"),MAX($B$2:$B6)+1,"")</TD></TR><TR><TD>B8</TD><TD>=IF(UPPER($A8="CHECK"),MAX($B$2:$B7)+1,"")</TD></TR><TR><TD>B9</TD><TD>=IF(UPPER($A9="CHECK"),MAX($B$2:$B8)+1,"")</TD></TR><TR><TD>B10</TD><TD>=IF(UPPER($A10="CHECK"),MAX($B$2:$B9)+1,"")</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
Excel tables to the web - Excel Jeanie Html 4
 
Upvote 0
Maybe

Sheet2


<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 165px"><COL style="WIDTH: 64px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>A</TD><TD>B</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt"> </TD><TD style="TEXT-ALIGN: right">1000</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt">check</TD><TD style="TEXT-ALIGN: right">1001</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt">deposit</TD><TD> </TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt">check</TD><TD style="TEXT-ALIGN: right">1002</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">6</TD><TD style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt">withdrawal</TD><TD> </TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">7</TD><TD style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt">check</TD><TD style="TEXT-ALIGN: right">1003</TD></TR></TBODY></TABLE>


<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; FONT-SIZE: 10pt; BORDER-LEFT-STYLE: groove; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>B3</TD><TD>=IF(A3="check",MAX($B$2:B2)+1,"")</TD></TR><TR><TD>B4</TD><TD>=IF(A4="check",MAX($B$2:B3)+1,"")</TD></TR><TR><TD>B5</TD><TD>=IF(A5="check",MAX($B$2:B4)+1,"")</TD></TR><TR><TD>B6</TD><TD>=IF(A6="check",MAX($B$2:B5)+1,"")</TD></TR><TR><TD>B7</TD><TD>=IF(A7="check",MAX($B$2:B6)+1,"")</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>


Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4


=IF(UPPER($A3="CHECK"),MAX($B$2:$B2)+1,"")

Any reason for using UPPER? Looks pointless, just wondering if I missed something.
 
Last edited:
Upvote 0
Use an expand range (Note the $ signs in the formulas):

Sheet1

<table style="background-color: rgb(255, 255, 255); padding-left: 2pt; padding-right: 2pt; font-family: Calibri,Arial; font-size: 11pt;" border="1" cellpadding="0" cellspacing="0"><colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 64px;"><col style="width: 64px;"></colgroup><tbody><tr style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt; font-weight: bold;"><td>
</td><td>A</td><td>B</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">1</td><td>Title</td><td>Value</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">2</td><td>Check</td><td style="text-align: right;">1000</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">3</td><td>Deposit</td><td>
</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">4</td><td>Check</td><td style="text-align: right;">1001</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">5</td><td>Deposit</td><td>
</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">6</td><td>Deposit</td><td>
</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">7</td><td>Check</td><td style="text-align: right;">1002</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">8</td><td>check</td><td style="text-align: right;">1003</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">9</td><td>check</td><td style="text-align: right;">1004</td></tr><tr style="height: 18px;"><td style="text-align: center; background-color: rgb(202, 202, 202); font-size: 8pt;">10</td><td>deposit</td><td>
</td></tr></tbody></table>
<table style="border-style: groove; border-color: rgb(0, 255, 0); background-color: rgb(255, 252, 249); font-family: Arial; color: rgb(0, 0, 0); font-size: 10pt;"><tbody><tr><td>Spreadsheet Formulas</td></tr><tr><td><table style="font-family: Arial; font-size: 9pt;" border="1" cellpadding="2" cellspacing="0"><tbody><tr style="background-color: rgb(202, 202, 202); font-size: 10pt;"><td>Cell</td><td>Formula</td></tr><tr><td>B3</td><td>=IF(UPPER($A3="CHECK"),MAX($B$2:$B2)+1,"")</td></tr><tr><td>B4</td><td>=IF(UPPER($A4="CHECK"),MAX($B$2:$B3)+1,"")</td></tr><tr><td>B5</td><td>=IF(UPPER($A5="CHECK"),MAX($B$2:$B4)+1,"")</td></tr><tr><td>B6</td><td>=IF(UPPER($A6="CHECK"),MAX($B$2:$B5)+1,"")</td></tr><tr><td>B7</td><td>=IF(UPPER($A7="CHECK"),MAX($B$2:$B6)+1,"")</td></tr><tr><td>B8</td><td>=IF(UPPER($A8="CHECK"),MAX($B$2:$B7)+1,"")</td></tr><tr><td>B9</td><td>=IF(UPPER($A9="CHECK"),MAX($B$2:$B8)+1,"")</td></tr><tr><td>B10</td><td>=IF(UPPER($A10="CHECK"),MAX($B$2:$B9)+1,"")</td></tr></tbody></table></td></tr></tbody></table>
Excel tables to the web - Excel Jeanie Html 4

Great post! It's very nice. Thank you so much for your post.
 
Upvote 0
Thank you all for the answer. I used Aladin Akyurek's and it worked perfectly.
I am going to test the other suggestion just to see how it works.

But thank you all.
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top