loop copy cells based

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Loop to copy cells based on content from other cells

Loop to copy cells based on content from other cells

resolvedResolved · High Priority · Version 2007

James has attended:
Excel VBA Intro Intermediate course

Loop to copy cells based on content from other cells

Hello,

I would like to be able to fill cells with a date value based on data within a sheet. In column A, I need to fill rows of dates based on the last date entered and also based on the time, which is in column B.

For example

A B
05/02/14 07:00
08:00
09:00
.
.
.
00:00
01:00


I need to populate the rest of column A with "05/02/14" until I reach "00:00". I would then change the date to 06/02/14 (or date +1). I can not quite workout how to:

1) count the rows in column A which are blank relative to column B
2) Copy and paste the date up until 23:00 and then change it to the next day at 00:00.

Any help would be much appreciated!

Thanks

James

RE: Loop to copy cells based on content from other cells

There is meant to be spacing between "A"& "B" so that the date is in column "A" and the times are in column B. For some reason the spaces were taken out!

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Go to source of a cell

The default setting in Excel is when you double click in a cell it actives the formula in the cell. If you have created a link and want to directly go to that link (say if on another sheet, click on Tools -options and take off the tick for eidt it directly in cell

View all Excel hints and tips


Server loaded in 0.08 secs.