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

loop copy cells based

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

ResolvedVersion 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:

Convert Text into Number

Some times numbers maybe imported in as text or you maybe concatenating numbers that form a text string that now are treated, because you had to extract them by Text functions

To convert Text into Number just encase the relevant cell reference or formula in the TEXT function. See Converting American Date to European hint

eg TEXT(Ref) or TEXT(formula)

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.