Consulting

Results 1 to 4 of 4

Thread: Error ,want help

  1. #1
    VBAX Contributor
    Joined
    Jun 2008
    Posts
    169
    Location

    Error ,want help

    Hi, all

    [VBA]Sheet2.Cells(I, 17).Value = Format(Sheet2.Cells(I, 8), "00:00").Value - Format(Sheet2.Cells(I, 7), "00:00").Value[/VBA]

    Its Error
    pls help me how should i change ?

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    without knowing what you are refering to we cant really help!, what is the error? have you got your cells address correct i.e Cells(RowIndex, ColumnIndex)
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Contributor
    Joined
    Jun 2008
    Posts
    169
    Location
    Quote Originally Posted by Simon Lloyd
    without knowing what you are refering to we cant really help!, what is the error? have you got your cells address correct i.e Cells(RowIndex, ColumnIndex)
    i'm really sorry the unclear message, correct the col G & H value are number format that actually is time,
    want to calculating the different time by col H - G and for convert to 00:00
    don't know it ok or not as i try built a macros for my worksheet.

  4. #4
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Have you just tried[VBA]
    Sheet2.Cells(I, 17).Value = Sheet2.Cells(I, 8).Value - Format(Sheet2.Cells(I, 7).Value
    [/VBA]
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •