how to include special characters in a formula?

G

Guest

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 said:
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])"
 
T

Tom Ogilvy

Here is a corrected version:

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


--
Regards,
Tom Ogilvy

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 said:
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])"
 
D

Dave Peterson

See one more reply at your other thread.
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 said:
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])"
 
G

Guest

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


Dave Peterson said:
See one more reply at your other thread.
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 said:
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])"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top