Remove Spaces beginning Time entry

  • Thread starter Thread starter Damon Longworth
  • Start date Start date
I am using "=TIME(HOUR(B11),MROUND(MINUTE(B11),I11),0)" for
a time card, but if a space is entered we get #VALUE error. How can
these spaces be filtered out. Input "06:00" or "06:00 am" works, but "
06:00" gives #VALUE error.

Thanks
Jack
 
Why would anyone put a space in a time value?

=TIME(HOUR(TRIM(B11)),MROUND(MINUTE(TRIM(B11)),I11),0)

--
Regards,

Peo Sjoblom

(No private emails please)
 
Another way

=TIME(HOUR(SUBSTITUTE(B11," ","")),MROUND(MINUTE(SUBSTITUTE(B11,"
","")),I11),0)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Try this:

=TIME(HOUR(TRIM(B11)),,)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


I am using "=TIME(HOUR(B11),MROUND(MINUTE(B11),I11),0)" for
a time card, but if a space is entered we get #VALUE error. How can
these spaces be filtered out. Input "06:00" or "06:00 am" works, but "
06:00" gives #VALUE error.

Thanks
Jack
 
Sorry, copied the wrong cell.
Try this:

=TIME(HOUR(TRIM(B11)),MROUND(MINUTE(TRIM(B11)),TRIM(I11)),0)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Try this:

=TIME(HOUR(TRIM(B11)),,)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


I am using "=TIME(HOUR(B11),MROUND(MINUTE(B11),I11),0)" for
a time card, but if a space is entered we get #VALUE error. How can
these spaces be filtered out. Input "06:00" or "06:00 am" works, but "
06:00" gives #VALUE error.

Thanks
Jack
 
Good question, but had some people do it, believe they would put a space to
remove the wrong number.
jack
 
Peo

This works very well.
Thanks
Jack

Peo said:
Why would anyone put a space in a time value?

=TIME(HOUR(TRIM(B11)),MROUND(MINUTE(TRIM(B11)),I11),0)

--
Regards,

Peo Sjoblom

(No private emails please)
 
So ... that possibility *doesn't* exist for I11?<g>
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------

Peo

This works very well.
Thanks
Jack
 
No I11 is fixed at 15 to round time at 15 min. intervals.
Thank You all for your help.

Jack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top