Please forgive me I'm not the best programmer.  The cells are
initially a custom field but if you change them to text it isn't
making a difference because of the : starting value
Is it possible that you could break down what this is doing
Range("L2").offset(0,1).resize(1,3).value =
split(Range(cellalpha).value,":")
This does work but not entirely of what I'm trying to do

Here is more of an example of what' I'm trying to do
data comes is as
D                 E              F
7:58:31 :00:00  :07:36

And what I want is
L    M    N   O    P    Q   R    S   T
7   58  31    0    0     0    0    7   36

as soon as it tries any cell beginning with : I get a type mismatch on
the first line LHour = Hour(Range(cellalpha)),  Maybe I'm not going
about this the right way.

On Apr 7, 12:35 pm, GoldenLance <samde...@gmail.com> wrote:
> Assuming the time is a text, and not a time value, use
>
> Range("L2").offset(0,1).resize(1,3).value =
> split(Range(cellalpha).value,":")
>
> On Apr 7, 5:11 pm, Speilman_54 <mbed...@gmail.com> wrote:
>
> > I'm having an issue where I'm trying to separate a cell with time in
> > it, for example the cell would conta 8:56:45 and I need each one of
> > those numbers into it's on cell so A1 = 8 A2 =56 A3=45.  So far I've
> > been able to ge this to work however the system sends the information
> > will send data like :45:45 if there work time is less than 1 hour
> > which is where I'm receiving Type Mismatch error.  If I could somehow
> > insert a 0 when this would solve this issue, but I've tried to but
> > unsuccessfully.  Any help would be much appreciated. Code is below
>
> > 'staffed time
> > '   hour separator
> >     LHour = Hour(Range(cellalpha))
> >     Range(L2) = LHour
> > ' minute separator
> >     LMinute = Minute(Range(cellalpha))
> >     Range("M2") = LMinute
> > ' Seconds separator
> >     LSecond = Second(Range(cellalpha))
> >     Range("N2") = LSecond

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to