Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Formula in a Macro

I have a budget spreadsheet with future pay dates for the next number
of years in row 1 (H1..BA1) across the top.

Down the left in col B (B2..B800) I have "Due Dates",and in col C
"Amount"

I have the formular =IF(AND($B2=H$1,$B2<I$1),$C2,"-") copied to about
150,000 cells that calculates when an amount is due, and puts that
amount under the appropriate pay date.

By inserting this formular, the spreadsheet had blown out quickly from
700Kb to 3.8Mb.

Can the above calculation be achieved with a macro that would update
those 150,000 cells (H1..BA1000) with the click of a button?

Regards, Kaye
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula in a Macro


place your cell at the cell you want to copy,
hit the macro recorder and make sure you are in relative mode, that is
when the square button appears pressed, now copy the cell you are on go
to the cell below and paste the formula, now stop recording.
Go to the forms toolbox and put a button on your spreadsheet, assign
that macro to that button. Now everytime you press that button the
macro initiates and whereever your cell is activated it will copy and
paste to the cell below it,
this is an example of what you can do to achieve what you want.
Experiment, you can record the macro so it will find the last cell in
the row and then go one down, by being in relative mode in your
recorder, select your column and press end and down arrow then down
arrow again, now you should be on the first empty row, and if you had
copyied the formula now you can paste it on the first empty cell,
there are also many ways you can activate the macro besides a button,
you could use a worksheet change event, well there are all sorts !!;)


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=516449

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Formula in a Macro

Tks Dave,

Regards Kaye

On Sat, 25 Feb 2006 07:09:31 -0600, davesexcel
wrote:


place your cell at the cell you want to copy,
hit the macro recorder and make sure you are in relative mode, that is
when the square button appears pressed, now copy the cell you are on go
to the cell below and paste the formula, now stop recording.
Go to the forms toolbox and put a button on your spreadsheet, assign
that macro to that button. Now everytime you press that button the
macro initiates and whereever your cell is activated it will copy and
paste to the cell below it,
this is an example of what you can do to achieve what you want.
Experiment, you can record the macro so it will find the last cell in
the row and then go one down, by being in relative mode in your
recorder, select your column and press end and down arrow then down
arrow again, now you should be on the first empty row, and if you had
copyied the formula now you can paste it on the first empty cell,
there are also many ways you can activate the macro besides a button,
you could use a worksheet change event, well there are all sorts !!;)

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
Formula Macro Secret Squirrel Excel Discussion (Misc queries) 7 January 27th 07 04:16 PM
Help With Formula and Macro Please Chris E.[_2_] Excel Programming 0 January 31st 06 07:25 PM
Macro/Formula Help? fluci Excel Discussion (Misc queries) 8 August 5th 05 11:31 PM
Macro - formula for end of last row JN Excel Worksheet Functions 1 June 1st 05 11:47 AM
Macro - formula for end of last row Gary Brown Excel Worksheet Functions 1 June 1st 05 12:02 AM


All times are GMT +1. The time now is 01:37 PM.

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"