PDA

View Full Version : How to move data between date rows using VBA?



jcarr
11-03-2020, 07:45 AM
I have a spreadsheet that has several thousand rows on it. There is a bunch of data under each date row that I need moved to a new worksheet up to the next date in the list. So basically if the date is 11/02/20 I need all data pulled down the list until Excel finds the next date field which would be 11/03/20, and then move all that data to a new worksheet, until it finds 11/04/20 and then does the process again.

However, I have absolutely no clue how this can be done.

snb
11-04-2020, 03:09 AM
Neither have we as long as you do not post a sample file.

jcarr
11-04-2020, 07:32 AM
Here is an example

A08/17/20
BHarmony Hourly
CAEST-AM
E0101 20341-H01S01 Show
D010101 GGSZ0015000 GoGo Squeez
D010102 FMIND74530 Indeed.com
E0201 20341-H02S01 Show
D020101 WALG2698000 Walgreens
D020102 ROCK0096100 Quicken Loans
E0301 20341-H03S01 Show
D030101 QTRA60003D0 Tracfone
D030102 ROCK0096100 Quicken Loans
A08/18/20
BHarmony Hourly
CAEST-AM
E0101 20342-H01S01 Show
D010101 GGSZ0015000 GoGo Squeez
D010102 FMIND74630 Indeed.com
E0201 20342-H02S01 Show
D020101 WALG2698000 Walgreens
D020102 ROCK0096100 Quicken Loans
E0301 20342-H03S01 Show
D030101 QTRA60003D0 Tracfone
D030102 ROCK0096100 Quicken Loans
E0401 20342-H04S01 Show

snb
11-04-2020, 09:04 AM
That's not a a sample file

Paul_Hossler
11-04-2020, 09:16 AM
@jcarr - to attach an example workbook click [Go Advanced] and then the paperclip icon

Please make sure that any obscure data is decoded. For example, I'm GUESSING that the "A" rows are dates, the "B" rows are companies, ...

It also helps if there is an 'after' example in the attachment

jcarr
11-04-2020, 09:52 AM
File attached

27401