+ Reply to Thread
Results 1 to 2 of 2

Training on macros in Excel97 using Windows 98

  1. #1
    BT Bill
    Guest

    Training on macros in Excel97 using Windows 98


    British Telecom use hhhh:mm:ss time format in downloaded bills, which
    Excel97 does not recognise. Cannot re-format to hh:mm:ss - Excel does not
    recognise hhhh:mm:ss as a numeric format ??. Tried (with no experience) to
    create a macro but having set it up to remove first two h's from first ten
    entries (of 546) when I applied the macro to entry eleven, it simply
    replicated the values of the first ten.

    Can anybody tell me what to do or where I can find out more about macros
    than is in Excel97's "Help" section ?

  2. #2
    Andy Brown
    Guest

    Re: Training on macros in Excel97 using Windows 98

    "BT Bill" <[email protected]> wrote in message
    news:[email protected]...

    > when I applied the macro to entry eleven, it simply
    > replicated the values of the first ten.


    This happens when your code uses absolute references rather than relative
    references. If you have:

    Range("A1") = 1

    , you get 1 in A1. But

    ActiveCell = 1

    gives you one in the cell that's selected when you start the code.

    If you used the macro recorder, try again. When the "Stop Recording"
    toolbar's visible, notice that it has a "Relative Reference" button. When
    you click this, everything you do from then on is recorded in relative (to
    the active cell) mode -- until you click it again (it toggles on & off).

    Post your code here if you wish ; ultimately, you'll need something *like*:

    For Each Cell In Selection
    Cell.Value = Right(Cell, (Len(Cell) - 2))
    Next Cell

    Rgds,
    Andy



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1