#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default FormulaR1C1

I have vfp code like below
loExcelSession.Cells(1,11).FormulaR1C1 =
ALLTRIM(STR(loExcelSession.Cells(1,11).Value))
Is there anyway to update the entire column at once?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default FormulaR1C1

dim target as Range
SET target = Range("{your range here}")
with target
.FormulaR1C1 = "{your formula here}"
end with



"Marc" wrote:

I have vfp code like below
loExcelSession.Cells(1,11).FormulaR1C1 =
ALLTRIM(STR(loExcelSession.Cells(1,11).Value))
Is there anyway to update the entire column at once?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default FormulaR1C1

Try this

With loExcelSession

LastRow = .Cells(.Rows.Count, 11).End(xlUp).Row
.Columns(12).Insert
.Cells(1,12).Resize(LastRow).Formula = "=TRIM(A11)"
.Cells(1,12).Resize(LastRow).Value = .Cells(1,12).Resize(LastRow).Value
.Columns(11).Delete
End With


--
__________________________________
HTH

Bob

"Marc" wrote in message
...
I have vfp code like below
loExcelSession.Cells(1,11).FormulaR1C1 =
ALLTRIM(STR(loExcelSession.Cells(1,11).Value))
Is there anyway to update the entire column at once?




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
What Does FormulaR1C1 Do? Don Guillett Excel Programming 0 December 14th 06 10:33 PM
Formular1c1 Steph[_3_] Excel Programming 2 June 30th 05 09:12 PM
FormulaR1C1 Aksel Børve Excel Programming 2 February 28th 05 09:52 PM
FormulaR1C1 D.S.[_3_] Excel Programming 2 January 2nd 04 12:03 AM
FormulaR1C1 aapp81[_22_] Excel Programming 3 December 3rd 03 10:47 PM


All times are GMT +1. The time now is 11:01 PM.

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

About Us

"It's about Microsoft Excel"