+ Reply to Thread
Results 1 to 4 of 4

Need Help With A Very Simple Macro

  1. #1
    Amca
    Guest

    Need Help With A Very Simple Macro

    I download from a database that provides ratios in the following format "
    0.95 :1" which is formatted as text. I tried to write a macro that would
    delete the " :1" so I could convert the cell to a number and use it in
    calculations. Every time I run the macro it changes the cell to the exact
    number that was in the original cell I used when creating the macro. Does
    anyone know what I am doing wrong?

  2. #2
    Franz
    Guest

    Re: Need Help With A Very Simple Macro

    "Amca" <Amca@discussions.microsoft.com>ha scritto nel messaggio
    21E4C523-CC8E-4C3B-A73C-A499C2ED3920@microsoft.com

    > I download from a database that provides ratios in the following
    > format "
    > 0.95 :1" which is formatted as text. I tried to write a macro that
    > would delete the " :1" so I could convert the cell to a number and
    > use it in calculations. Every time I run the macro it changes the
    > cell to the exact number that was in the original cell I used when
    > creating the macro. Does anyone know what I am doing wrong?


    Instead of using a macro, you can select the range to convert, then menu
    Edit, substitute and here in the cell Find put :1 and leave blank the cell
    Substitute, then press Ok.


    --
    Hoping to be helpful...

    Regards

    Franz

    ----------------------------------------------------------------------------------------
    To reply translate from italian InVento (no capital letters)
    ----------------------------------------------------------------------------------------



  3. #3
    Don Guillett
    Guest

    Re: Need Help With A Very Simple Macro

    As always, post your efforts to help us help you

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "Amca" <Amca@discussions.microsoft.com> wrote in message
    news:21E4C523-CC8E-4C3B-A73C-A499C2ED3920@microsoft.com...
    > I download from a database that provides ratios in the following format "
    > 0.95 :1" which is formatted as text. I tried to write a macro that would
    > delete the " :1" so I could convert the cell to a number and use it in
    > calculations. Every time I run the macro it changes the cell to the exact
    > number that was in the original cell I used when creating the macro. Does
    > anyone know what I am doing wrong?




  4. #4
    CLR
    Guest

    Re: Need Help With A Very Simple Macro

    Assuming your data is in column A, here's a formula you can put in B1 and
    copy down to return what you want as a number..........

    =(LEFT(A1,FIND(":",A1)-1))*1

    Vaya con Dios,
    Chuck, CABGx3


    "Amca" <Amca@discussions.microsoft.com> wrote in message
    news:21E4C523-CC8E-4C3B-A73C-A499C2ED3920@microsoft.com...
    > I download from a database that provides ratios in the following format "
    > 0.95 :1" which is formatted as text. I tried to write a macro that would
    > delete the " :1" so I could convert the cell to a number and use it in
    > calculations. Every time I run the macro it changes the cell to the exact
    > number that was in the original cell I used when creating the macro. Does
    > anyone know what I am doing wrong?




+ 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