Concatenate function with SUM function

Nalani

Well-known Member
Joined
Apr 10, 2009
Messages
1,047
I have the formula below in a cell B9:
="Total This Sheet" & " " &"$" &SUM(C9:Q9)&" Equals "& ROUND(SUM(C9:Q9),2)/11&" HRS"

Test

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 182px"><COL style="WIDTH: 74px"><COL style="WIDTH: 74px"><COL style="WIDTH: 74px"><COL style="WIDTH: 74px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD></TR><TR style="HEIGHT: 25px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffff00; FONT-SIZE: 8pt; FONT-WEIGHT: bold">Total This Sheet $73 Equals 6.63636363636364 HRS</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">25.00</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">24.00</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">14.00</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">10.00</TD></TR></TBODY></TABLE>



Is it possible to somehow format the Total hours to one or two decimal places instead of what is showing.

I have tried to format the Cell (number, text, general, etc) to no avail. I have not tried to apply a Custom Format because I'm not sure how that Custom would even go.

Or maybe it is something that I need in the ROUND(SUM() ) formula of the Concat formula.:confused:

Thanks
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I think you need to change this

ROUND(SUM(C9:Q9),2)/11

to

ROUND(SUM(C9:Q9)/11,2)
 
Upvote 0
Thanks for the reply jon

But that doesn't work. I get this:
Test

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 182px"><COL style="WIDTH: 74px"><COL style="WIDTH: 74px"><COL style="WIDTH: 74px"><COL style="WIDTH: 74px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD></TR><TR style="HEIGHT: 25px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffff00; FONT-SIZE: 8pt; FONT-WEIGHT: bold">="Total This Sheet" & " " &"$" &SUM(C9:Q9)&" Equals "& ROUND(SUM(C9:Q9)/11,2)&" HRS"</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">25.00</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">24.00</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">14.00</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #00ffff; FONT-SIZE: 8pt">10.00</TD></TR></TBODY></TABLE>

I even trid putting an equal sign in front of ROUND.
 
Upvote 0
Hi Nalani,

Jon's suggestion seems to work for me:

="Total This Sheet" & " " &"$" &SUM(C10:Q10)&" Equals "& ROUND(SUM(C9:Q9)/11,2)&" HRS"

gives

Total This Sheet $73 Equals 6.64 HRS
 
Upvote 0
Thanks jon

That did it, played around with formating and formula changes so much that I didn't go back to the "tests" of each with your correction to the formula.

Thanks again. ;)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

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