LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Adding a formula to a macro

I have been building upon Ron's macro that merges worksheets together into a
master worksheet. But I need to add 2 more steps to it. I need for it to
sum column E. The problem is that the range will vary each time the macro is
run. I still do not understand how to do the code for finding the last row.
I also need for it to add an if statement that puts a value in one of two
columns based on a value in a third column. My formula that I have been
entering manually is:
=If F1 = "R" then G1=E1 else H1=E1. I need this formula to loop through
each row in the table, but the end of the table varies. I really appreciate
all the help I have received from you guys. This is my very first attempt to
do any programming. THANKS BUNCHES
 
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
Adding to a Macro Steven Excel Discussion (Misc queries) 2 December 15th 08 06:21 PM
macro adding formula to new sheet toddsavage100 Excel Discussion (Misc queries) 2 March 14th 06 03:03 AM
adding a formula to a macro Hemming Excel Discussion (Misc queries) 1 March 9th 06 03:15 PM
adding a formula in macro cindy Excel Programming 8 August 10th 05 09:43 PM
Adding a character to a defined name with a formula or macro InfinityDesigns Excel Discussion (Misc queries) 20 June 24th 05 06:36 AM


All times are GMT +1. The time now is 03:03 AM.

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"