Complex text and math formula

gstevens

New Member
Joined
Jun 26, 2009
Messages
11
Hi everyone,
I have a complex formula I need to figure out that is way over my head. I have a list of rows with text values in one column and corresponding numeric values in another col. What I am trying to do is get subtotals of the numeric data every time the text value changes.
Example:
The first 5 rows the text value is red then the next 8 are blue, the next 10 green etc. Is it possible to have a formula read when the text value changes insert a blank row and give me a subtotal then continuing down the list repeating the process every time the text value changes?

Thank you.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Thanks Texasalynn; it’s almost perfect. The numeric data is actually in 2 columns and its giving me the subtotal for each column; not a big deal as I can add these two subtotals together to get one correct subtotal. The only issue is that the sheet has thousands of rows and it’s a timely process to do that.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
This data is from
<o:p></o:p>
<TABLE style="MARGIN: auto auto auto 4.65pt; WIDTH: 203pt; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 width=271><TBODY><TR style="HEIGHT: 12pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 46pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=61 noWrap>
$1,076.00<o:p></o:p>

</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 45pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=60 noWrap>
$0.00<o:p></o:p>


</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 56pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=75 noWrap>alab Total<o:p></o:p>

</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 56pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=75 noWrap>1,076.00 <o:p></o:p>

</TD></TR></TBODY></TABLE>​
<o:p></o:p>
These formulas
<o:p></o:p>
<TABLE style="MARGIN: auto auto auto 4.65pt; WIDTH: 278.65pt; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class=MsoNormalTable border=0 cellSpacing=0 cellPadding=0 width=372><TBODY><TR style="HEIGHT: 12pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 82.65pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=110 noWrap>;=SUBTOTAL(9,I2:I23)<o:p></o:p>

</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 84pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=112 noWrap>=SUBTOTAL(9,J2:J23)<o:p></o:p>

</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 56pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=75 noWrap>alab Total<o:p></o:p>

</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 56pt; PADDING-RIGHT: 5.4pt; HEIGHT: 12pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8; PADDING-TOP: 0in" vAlign=bottom width=75 noWrap>=+J24+I24 <o:p></o:p>

</TD></TR></TBODY></TABLE>
<o:p></o:p>
Last question; is there a way to avoid manually adding these two columns and getting one subtotal?
<o:p></o:p>
Thanks again for your help!
 
Upvote 0
I would suggest that you put in the column to add the two columns, then do the subtotal on that.
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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