Closed Thread
Results 1 to 4 of 4

Converting number to text with formatting in VBA

  1. #1
    Rowan Drummond
    Guest

    Re: Converting number to text with formatting in VBA

    You need to double up the internal double quotes eg

    Range("l1:l4000").FormulaR1C1 = _
    "=text(RC[-4],""[h]:mm"")"

    Hope this helps
    Rowan

    [email protected] wrote:
    > ok, her is what I have
    > E F
    > 14:00 15:00
    >
    > I want the out put to look the same only converted to text in the l
    > column. I can do it with formulas in each cell, but when I try to get
    > VBA to drop the formulas in the cells, it errors. I am using:
    >
    > Range("l1:l4000").FormulaR1C1 = _
    > "=text(RC[-4],"[h]:mm")"
    >
    > Range("m1:m4000").FormulaR1C1=_
    > "=text(RC[-4],"[h]:mm")"
    >
    > basically it is seeing the " and taking that as the end.
    >
    > Any ideas?
    >


  2. #2

    Converting number to text with formatting in VBA

    ok, her is what I have
    E F
    14:00 15:00

    I want the out put to look the same only converted to text in the l
    column. I can do it with formulas in each cell, but when I try to get
    VBA to drop the formulas in the cells, it errors. I am using:

    Range("l1:l4000").FormulaR1C1 = _
    "=text(RC[-4],"[h]:mm")"

    Range("m1:m4000").FormulaR1C1=_
    "=text(RC[-4],"[h]:mm")"

    basically it is seeing the " and taking that as the end.

    Any ideas?


  3. #3

    Re: Converting number to text with formatting in VBA

    your a geniuse thanks


  4. #4
    Rowan Drummond
    Guest

    Re: Converting number to text with formatting in VBA

    You're welcome.

    [email protected] wrote:
    > your a geniuse thanks
    >


Closed 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