Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Insert new column and paste formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Judy Ward - 23 Jan 2008 01:49 GMT
I have read posts about pasting a formula into a column that already has data
by using, for example:
Range("L2:L" & Range("L65536").End(xlUp).Row).FormulaR1C1 =
"=SUM(RC[1]:RC[38]"
This isn't working for me because my column does not have any data in it
(inserting the column is part of my code).

All the other columns in the spreadsheet have data, but not this newly
inserted column.  Can anyone help me with pasting my formula into the column
only for the rows that have data?

Thank you for any help you can give me,
Judy
Dave Peterson - 23 Jan 2008 03:01 GMT
Maybe you could just fill the range with a formula that looks blank if there is
no data???

  .formular1c1 = "=if(count(RC[1]:RC[38])=0,"""",SUM(RC[1]:RC[38]))"

(and watch your )'s--you were missing that last one.

> I have read posts about pasting a formula into a column that already has data
> by using, for example:
[quoted text clipped - 9 lines]
> Thank you for any help you can give me,
> Judy

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.