Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Wrapping text in VBA Code

How do you change this code:

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"",if(card2=11,""J"",if(card2=12," "Q"",if
(card2=13,""K"",card2))))"

Into this:

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"", _
if(card2=11,""J"", _
if(card2=12,""Q"", _
if(card2=13,""K"",card2))))"

Without getting a complied error stating that excel
expects an "end statement".

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Wrapping text in VBA Code

Pete,

Use something like

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"" ," & _
"if(card2=11,""J"" ," & _
"if(card2=12,""Q"" ," & _
"if(card2=13,""K"",card2))))"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Pete" wrote in message
...
How do you change this code:

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"",if(card2=11,""J"",if(card2=12," "Q"",if
(card2=13,""K"",card2))))"

Into this:

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"", _
if(card2=11,""J"", _
if(card2=12,""Q"", _
if(card2=13,""K"",card2))))"

Without getting a complied error stating that excel
expects an "end statement".

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Wrapping text in VBA Code

Thanks Chip it worked great.

Pete
-----Original Message-----
Pete,

Use something like

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"" ," & _
"if(card2=11,""J"" ," & _
"if(card2=12,""Q"" ," & _
"if(card2=13,""K"",card2))))"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Pete" wrote in

message
...
How do you change this code:

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"",if(card2=11,""J"",if

(card2=12,""Q"",if
(card2=13,""K"",card2))))"

Into this:

Range("Bcard2").FormulaR1C1 = _
"=IF(card2=1,""A"", _
if(card2=11,""J"", _
if(card2=12,""Q"", _
if(card2=13,""K"",card2))))"

Without getting a complied error stating that excel
expects an "end statement".

Thanks



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I prevent a long string of text from wrapping in a text fil stevekaz21 Excel Discussion (Misc queries) 1 October 23rd 09 03:46 PM
Text wrapping Gary''s Student Excel Discussion (Misc queries) 1 February 27th 09 10:03 AM
Wrapping Text Té Excel Discussion (Misc queries) 1 January 23rd 08 03:01 PM
text wrapping when text is pasted in excel psipg Excel Discussion (Misc queries) 2 December 5th 06 07:25 PM
I am using wrap text in excel, so why isn't all my text wrapping? GatorDawg123 Excel Discussion (Misc queries) 2 May 6th 06 05:52 PM


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"