LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Copy formula

Hi,

I have this problem when I run excel macro below on a new worksheet
where there is no data except the header on row1, then the excel
formula still copying down the whole column A with 0 value and it will
stop copying until the last used cell if there is data on column A
How can I modify this excel macro to decide whether to copy the excel
formula will depend on the data available on column A ( ie starting
from A2 ) of new worksheet

Range("A1").Select
ActiveCell.FormulaR1C1 = "=VALUE(RC[2])&RC[6]"
Dim rng2 As Range
Set rng2 = Range(Cells(1, 2), Cells(1, 2).End(xlDown))
rng2.Offset(0, -1).Formula = Cells(1, 1).Formula

Thanks in advance, I’m a excel VBA beginner
Regards
Len
 
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
copy formula result (text) only - without copying formula Mulberry Excel Discussion (Misc queries) 2 October 2nd 08 09:51 AM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
copy formula down a column and have cell references change within formula brad New Users to Excel 5 May 13th 07 04:38 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
Copy formula so destination displays formula as text Omunene Excel Discussion (Misc queries) 2 September 30th 05 06:28 PM


All times are GMT +1. The time now is 03:16 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"