Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default syntax question

I'm having a problem with the correct syntax on the following line:

ActiveCell.Offset(0, 2).FormulaR1C1 = "=text(mid(r[]c[-1]),6,5)),""00"")"

The problem is it is putting the formula in the cell instead of the actual
value. I have tried to remove the begging and ending " but then I get an
error on the 'r[]'. I'm sure it is the syntax, I just don't know how to
correct it. Thanks for the help.....


--
JT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default syntax question

With ActiveCell
.Offset(0, 2).Value = Evaluate("text(mid(" & .Offset(0, -1).Address
& _
",6,5),""00"")")
End With


--

HTH

RP
(remove nothere from the email address if mailing direct)


"JT" wrote in message
...
I'm having a problem with the correct syntax on the following line:

ActiveCell.Offset(0, 2).FormulaR1C1 = "=text(mid(r[]c[-1]),6,5)),""00"")"

The problem is it is putting the formula in the cell instead of the actual
value. I have tried to remove the begging and ending " but then I get an
error on the 'r[]'. I'm sure it is the syntax, I just don't know how to
correct it. Thanks for the help.....


--
JT



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
Syntax question BigDave63 Excel Worksheet Functions 4 February 5th 09 06:50 PM
VBA syntax question Matt Excel Discussion (Misc queries) 2 December 5th 07 03:08 PM
syntax question Giselle Excel Worksheet Functions 4 January 29th 06 01:59 AM
Syntax question Stuart[_5_] Excel Programming 3 December 3rd 03 08:45 PM
VBA Syntax Question? Michael168[_54_] Excel Programming 0 November 5th 03 11:02 AM


All times are GMT +1. The time now is 12:19 PM.

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"