LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Do I use a formula or a macro to copy cells?

(3rd repost of this question - no responses)

Column B contains a bunch of information for Monday, March 23rd. Column C
contains a bunch of information for Tuesday, March 24th and so on. The data
is set up so its easy to print out on a sheet, and every week the
information is overwritten with the new weeks information. Column B becomes
Monday, March 30th, column C becomes Tuesday, March 31st and so on. Every
week the dates are updated and the columns re-written.

I want to preserve the information so long-term trends etc can be analyzed.
So Im thinking that Ill pull the information into another sheet for each
day, and wow wouldnt it be great if I could do this automatically. Ill set
up another sheet where each row represents a date: row 1 will be March 23rd,
row 2 will be March 24th and so on. Then the information from Monday, March
23 (column B) can be placed into the first row, the information from Tuesday,
March 24(column C) can be placed into the second row, and so on. It would be
a real-time update so as the information for the current day changes then the
preserved information also changes, and the beauty is that once that day is
over and its the next day, then that preserved information from the day
before is no longer touched.

How do I do it? LOL.

Youd think the formula €œ=B1€ would do what I need, but B1 will eventually
represent the next week. I dont want to overwrite my preserved information
from the week before so I need a condition €“ an IF function based on date.
But an IF function requires a false action : IF true then copy, IF false
then€¦two quotes? A zero? Hmmm. No matter what I place into the function, the
false condition blanks my data. I cant find a way to leave the data alone.
I cannot preserve it.

The problem with using a formula to grab data from a fixed location such as
the numbers in a cell black is that the source numbers will eventually
change, and since the formula to grab that information will always remain
active, it too will eventually overwrite the original data I wanted to
preserve, which is what I don't want, or it's going to return a "" or zero
value because I tried to make it conditional on date March 23 only, which is
also what I don't want.

I need a "do nothing" so March 23 is preserved once it's written into the
row that preserves information for March 23 and its no longer March 23rd.
I'm thinking I need a macro, VBA, something.

I need a macro or VBA code to say :

IF today is March 23, 2009 then write to here, else leave this location
alone (don't write "" double quotes, don't write a zero, dont erase the
information you wrote earlier, just leave this location alone and move on,
whatever number that was brought to this location on March 23, 2009
just leave it alone, it must not be March 23, 2009 anymore so move on).

The next row, because it's a new day, will be similar : IF today is March
24, 2009 then write to here, else...yadda yadda yadda

And so on for the week of March 23, 2009.

Next week column B now represents March 30, 2009, and there's a new row for
preserving the information: IF today is March 30, 2009 then write to here,
else...yadda yadda yadda


Preservation Sheet:
Row 1 : March 23 €“ the information for March 23 goes here.
Row 2 : March 24 €“ the information for March 24 goes here.
€¦
Row 8 : March 30 €“ the information for March 30 goes here.
€¦

- Eric

 
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
Macro should copy & paste to various cells, but won't. MacroMike Excel Discussion (Misc queries) 6 September 11th 07 09:14 AM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
Copy Selected cells down a row with macro DB33 Excel Discussion (Misc queries) 1 February 15th 06 05:33 PM
Macro to copy cells to rows below [email protected] Excel Discussion (Misc queries) 1 January 20th 06 06:59 PM
Macro to copy cells Esrei Excel Discussion (Misc queries) 2 August 11th 05 11:31 AM


All times are GMT +1. The time now is 04:47 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"