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 / March 2008

Tip: Looking for answers? Try searching our database.

Help to create a macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cornelius - 30 Mar 2008 19:03 GMT
Hi,

I need to create a macro that calculates a value based on several values in
a range. The result from the calculations shuld be copied into a new column
with the same range. I have tried to record this operation but I need help to
make the macro repeat the operations throug the range. I have pasted the code
from my recorded macro:

Range("B2").Select
   ActiveCell.FormulaR1C1 = "=R[1]C[8]"
   Range("C4").Select
   ActiveCell.FormulaR1C1 = "=R[-1]C[6]"
   Range("K3").Select
   ActiveCell.FormulaR1C1 = "=R[11]C[-9]"
   Range("L3").Select
   ActiveCell.FormulaR1C1 = "=R[8]C[-10]"
End sub

I copy values from J3:J39 to be used in B2. Then I copy values from I3:I39
to be used in C4. From this i get two results that i want to be copied to new
columns in the same range. The results is genereted in cells B11 and B14, and
is copied into the range K3:K39 and L3:L39.

Thank you

Cornelius
Dave D-C - 31 Mar 2008 17:07 GMT
>.. I copy values from J3:J39 to be used in B2 ..
Be more specific on this.  Say it in a different way.  Dave D-C

>Hi,
>
[quoted text clipped - 22 lines]
>
>Cornelius

----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
 
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.