Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
inthestands
 
Posts: n/a
Default 2 different macro questions

1st) i download 4 different sets of data from our stores on a nightly basis.
I insert that days sales data into a template. One store may only have 50
transactions where another may have 200. The template has some preset
formulas in them to calculate margins and costs to the transactions. When I
sort the new data the formula line may be anywhere from line 400 to line
1000. How can i insert a macro so it knows to look for the formula line and
then copy down to include all of the transactions? I think has something to
do with absolute references versus relative references, but I have not
figured it out yet. Thanks for the help

2nd) When I first open up to run a macro the little recorder icon remains on
the page. But if I screw up and need to rerun it, it disappears and then I
have to go back into tools to stop the recorder. Why is this happening, and
how do I keep the recorder on the page?

Thanks in advance,


--
inthestands
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default 2 different macro questions

#1. Maybe you can use a column in the imported data to get the last row.

Dim LastRow as long
with activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
end with

Say your formula is in B1 and needs to be copied down.

with activesheet
.range("B2:B" & lastrow).formular1c1 = .range("b1").formular1c1
end with

=====
Or maybe using autofill would work:

With ActiveSheet
.Range("B1").AutoFill _
Destination:=.Range("B1:B" & lastrow)
end with

#2. It sounds like you're closing that recording toolbar by using the X. If it
disappears again, just start recording a new macro.

Then use Tools|Customize|Toolbars tab to show the "stop recording" toolbar.

Then don't use that X to close it again! <vbg. Click the stop recording
button.


inthestands wrote:

1st) i download 4 different sets of data from our stores on a nightly basis.
I insert that days sales data into a template. One store may only have 50
transactions where another may have 200. The template has some preset
formulas in them to calculate margins and costs to the transactions. When I
sort the new data the formula line may be anywhere from line 400 to line
1000. How can i insert a macro so it knows to look for the formula line and
then copy down to include all of the transactions? I think has something to
do with absolute references versus relative references, but I have not
figured it out yet. Thanks for the help

2nd) When I first open up to run a macro the little recorder icon remains on
the page. But if I screw up and need to rerun it, it disappears and then I
have to go back into tools to stop the recorder. Why is this happening, and
how do I keep the recorder on the page?

Thanks in advance,

--
inthestands


--

Dave Peterson
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
2 questions: Using solver in Macro AND converting to Word document to print A3 yendor28 Excel Discussion (Misc queries) 3 November 17th 05 07:55 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Where can I post Macro questions? David Excel Worksheet Functions 4 May 25th 05 10:39 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM


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

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"