Selecting A Range of Cells that is Different Sizes

LuckCalibration

New Member
Joined
Jan 11, 2017
Messages
2
pi68mBY.png

Hello I have a Worksheet with Data that is Different sizes as you can see i have many ranges that have Names Trades and Hours aswell as Date
i am trying to make a macro that would select this range regardless of whether it is 14 cells or 5 and then add to the selection the two adjacent cells in the column to the right and then the cells in the row above it below is the vba i do currently have

What i really want to do is make a macro to select these ranges and copy them to the first 3 colums going down in chronological order

Code:
Sub SelectNameColumn()
Range(ActiveCell, ActiveCell.End(xlDown)).Select
End Sub
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to MrExcel,

From your description, I think I understand the blocks of cells you want to select. I'm not sure I understand where you want them to be copied.

Are you wanting to copy them to columns A:C of a new sheet, with the blocks in order of oldest new newest date?
 
Upvote 0
Welcome to MrExcel,

From your description, I think I understand the blocks of cells you want to select. I'm not sure I understand where you want them to be copied.

Are you wanting to copy them to columns A:C of a new sheet, with the blocks in order of oldest new newest date?
yes i want to cop them to columns A:C of a new sheet in order of oldest to newest.
 
Upvote 0
Sorry that I lost track of this as an unanswered response.

Can the code assume these patterns that are true of your screenshot example:

1. The blocks of data are aligned so that the rows with dates (rows 1 and 16 in your example) have only dates (and no employee data for another block of data).

2. The data blocks are all 3 columns wide, they are aligned, and there are no blank columns in between data blocks.

If you are going to use this new sheet of consolidated data for analysis, I'd suggest you "normalize" the data, by moving the dates to a 4th field in the new sheet and listing the date for each record (not just once per day). This allows you to easily sort, query or pivot the data. Would you like to try that approach?
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top