Thread: macro help
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Spiky Spiky is offline
external usenet poster
 
Posts: 622
Default macro help

On Aug 19, 4:11 pm, scott wrote:
Yes, I agree that that formula works. However, for simplicity I only used
a1:a20. I am doing this for every day between January 1, 2001 and July 31,
2008. So by having a macro I would be saving a tremendous amount of time.
You can see that I will be using a large number of cells; do you have any
other suggestions?


Well, since it is the same formula every time, you just have to copy
it to all the other cells. This can be done for thousands and
thousands of cells if necessary in just a few seconds. Esp if you know
how to move and select ranges with the keyboard. CTRL-SHIFT-UP and so
forth. Makes everything go faster, really.

If it is exactly like the above, starting in B5 (don't use it above
row 5), use this formula instead:
=IF(A1="","",AVERAGE(A1:A5))

That can be copy/pasted to an easy-to-select rectangle block of cells
and be done in an instant. And it will give your staggered look,
regardless of how many columns you need.

No doubt a macro can also do something like this fast, but you also
have to write a new one each time you have a slightly different task.
I find good use of the keyboard (skip the mouse, it slows you down) to
be very fast.