ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Concact strings (https://www.excelbanter.com/excel-discussion-misc-queries/191768-concact-strings.html)

clara

Concact strings
 
Hi all,

I have a formula sum(b2, 20) showing the total hours, now I want to go a
step further, I want to suffix "Hour(s)" which depends on the values.

Clara
--
thank you so much for your help

Gary''s Student

Concact strings
 
=SUM(B2,20) & "Hour(s)"
--
Gary''s Student - gsnu200793

KePaHa

Concact strings
 
Or =SUM(G2:G20) & IF(SUM(G2:G20)<=1, " Hour", " Hours")

"Gary''s Student" wrote:

=SUM(B2,20) & "Hour(s)"
--
Gary''s Student - gsnu200793


clara

Concact strings
 
HI KePaHa

Thank you for your help!

Clara
--
thank you so much for your help


"KePaHa" wrote:

Or =SUM(G2:G20) & IF(SUM(G2:G20)<=1, " Hour", " Hours")

"Gary''s Student" wrote:

=SUM(B2,20) & "Hour(s)"
--
Gary''s Student - gsnu200793


clara

Concact strings
 
Hi KePaHa,

If the result of sum is 0( zero ), how to make the cell empty instead of
displaying 0


Clara
--
thank you so much for your help


"KePaHa" wrote:

Or =SUM(G2:G20) & IF(SUM(G2:G20)<=1, " Hour", " Hours")

"Gary''s Student" wrote:

=SUM(B2,20) & "Hour(s)"
--
Gary''s Student - gsnu200793


David Biddulph[_2_]

Concact strings
 
=IF(SUM(...)=0,"",your_formula)
--
David Biddulph

"clara" wrote in message
...
Hi KePaHa,

If the result of sum is 0( zero ), how to make the cell empty instead of
displaying 0


Clara
--
thank you so much for your help


"KePaHa" wrote:

Or =SUM(G2:G20) & IF(SUM(G2:G20)<=1, " Hour", " Hours")

"Gary''s Student" wrote:

=SUM(B2,20) & "Hour(s)"
--
Gary''s Student - gsnu200793




KePaHa

Concact strings
 
Something like this =IF(SUM(XX:XX)=0, "", OLD FORMULA HERE).
So, if the sum =0, then do nothing, otherwise, do the original formula.

"clara" wrote:

Hi KePaHa,

If the result of sum is 0( zero ), how to make the cell empty instead of
displaying 0


Clara
--
thank you so much for your help


"KePaHa" wrote:

Or =SUM(G2:G20) & IF(SUM(G2:G20)<=1, " Hour", " Hours")

"Gary''s Student" wrote:

=SUM(B2,20) & "Hour(s)"
--
Gary''s Student - gsnu200793



All times are GMT +1. The time now is 02:33 AM.

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