+ Reply to Thread
Results 1 to 4 of 4

how to include special characters in a formula?

  1. #1
    Guest

    how to include special characters in a formula?

    Hi,

    I have tried the suggestion below, but it still doesnt work.
    -------------------------------------------------------------------------

    ya, i tried tat,
    VBA would give me a "expected: line nubmer or label or statement or end of
    statement" compile error.
    i guess its bcos, by using double quotes, we break the formula up into 3
    parts.


    "Chip Pearson" <chip@cpearson.com> wrote in message
    news:uffx2rVhFHA.576@tk2msftngp13.phx.gbl...
    > Use double quotes instead of apostrophes.
    >
    > Range("N2").FormulaR1C1 = "=HOUR(RC[-1]" & ":" & MINUTE(RC[-1])"
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >


    >> one minor question.
    >> how do you include special characters in formula? i am tryign to
    >> achieve something like 9: 30.
    >> with the semi-colon separating hours and mins.
    >>
    >> Range("N2").FormulaR1C1 = "=hour(rc[-1])& ':' &minute(rc[-1])"
    >>



  2. #2
    Tom Ogilvy
    Guest

    Re: how to include special characters in a formula?

    Here is a corrected version:

    Range("N2").FormulaR1C1 = "=HOUR(RC[-1]) & "":"" & MINUTE(RC[-1])"


    --
    Regards,
    Tom Ogilvy

    <a> wrote in message news:42d14b56$1@news.starhub.net.sg...
    > Hi,
    >
    > I have tried the suggestion below, but it still doesnt work.
    > -------------------------------------------------------------------------
    >
    > ya, i tried tat,
    > VBA would give me a "expected: line nubmer or label or statement or end of
    > statement" compile error.
    > i guess its bcos, by using double quotes, we break the formula up into 3
    > parts.
    >
    >
    > "Chip Pearson" <chip@cpearson.com> wrote in message
    > news:uffx2rVhFHA.576@tk2msftngp13.phx.gbl...
    > > Use double quotes instead of apostrophes.
    > >
    > > Range("N2").FormulaR1C1 = "=HOUR(RC[-1]" & ":" & MINUTE(RC[-1])"
    > >
    > >
    > > --
    > > Cordially,
    > > Chip Pearson
    > > Microsoft MVP - Excel
    > > Pearson Software Consulting, LLC
    > > www.cpearson.com
    > >
    > >

    >
    > >> one minor question.
    > >> how do you include special characters in formula? i am tryign to
    > >> achieve something like 9: 30.
    > >> with the semi-colon separating hours and mins.
    > >>
    > >> Range("N2").FormulaR1C1 = "=hour(rc[-1])& ':' &minute(rc[-1])"
    > >>

    >




  3. #3
    Dave Peterson
    Guest

    Re: how to include special characters in a formula?

    See one more reply at your other thread.

    a wrote:
    >
    > Hi,
    >
    > I have tried the suggestion below, but it still doesnt work.
    > -------------------------------------------------------------------------
    >
    > ya, i tried tat,
    > VBA would give me a "expected: line nubmer or label or statement or end of
    > statement" compile error.
    > i guess its bcos, by using double quotes, we break the formula up into 3
    > parts.
    >
    > "Chip Pearson" <chip@cpearson.com> wrote in message
    > news:uffx2rVhFHA.576@tk2msftngp13.phx.gbl...
    > > Use double quotes instead of apostrophes.
    > >
    > > Range("N2").FormulaR1C1 = "=HOUR(RC[-1]" & ":" & MINUTE(RC[-1])"
    > >
    > >
    > > --
    > > Cordially,
    > > Chip Pearson
    > > Microsoft MVP - Excel
    > > Pearson Software Consulting, LLC
    > > www.cpearson.com
    > >
    > >

    >
    > >> one minor question.
    > >> how do you include special characters in formula? i am tryign to
    > >> achieve something like 9: 30.
    > >> with the semi-colon separating hours and mins.
    > >>
    > >> Range("N2").FormulaR1C1 = "=hour(rc[-1])& ':' &minute(rc[-1])"
    > >>


    --

    Dave Peterson

  4. #4
    Guest

    Re: how to include special characters in a formula?

    thanks alot,
    now i realize you dont need & to link up the strings inside a formula.


    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:42D14F1F.2D9BE07A@verizonXSPAM.net...
    > See one more reply at your other thread.
    >
    > a wrote:
    >>
    >> Hi,
    >>
    >> I have tried the suggestion below, but it still doesnt work.
    >> -------------------------------------------------------------------------
    >>
    >> ya, i tried tat,
    >> VBA would give me a "expected: line nubmer or label or statement or end
    >> of
    >> statement" compile error.
    >> i guess its bcos, by using double quotes, we break the formula up into 3
    >> parts.
    >>
    >> "Chip Pearson" <chip@cpearson.com> wrote in message
    >> news:uffx2rVhFHA.576@tk2msftngp13.phx.gbl...
    >> > Use double quotes instead of apostrophes.
    >> >
    >> > Range("N2").FormulaR1C1 = "=HOUR(RC[-1]" & ":" & MINUTE(RC[-1])"
    >> >
    >> >
    >> > --
    >> > Cordially,
    >> > Chip Pearson
    >> > Microsoft MVP - Excel
    >> > Pearson Software Consulting, LLC
    >> > www.cpearson.com
    >> >
    >> >

    >>
    >> >> one minor question.
    >> >> how do you include special characters in formula? i am tryign to
    >> >> achieve something like 9: 30.
    >> >> with the semi-colon separating hours and mins.
    >> >>
    >> >> Range("N2").FormulaR1C1 = "=hour(rc[-1])& ':' &minute(rc[-1])"
    >> >>

    >
    > --
    >
    > Dave Peterson



+ 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