Pilot5000
New Member
Hope my question is clear and not complicated, and any help will be appreciated
I have sheet with data in columns (range "A" to "M"), the data in ranges("A"&"B") start from row 7 to row 23 down , the data in ranges("C","E" & "G”) start from row 2 downward to row 27 , the data in ranges("D" "F" &"H") start from row 10 down to row 29. the data in ranges("I" "K" &"M") start from row 4 down to row 25columns (“J” & “L”) are empty no data .
The problem is that every week the information can be different in 3 aspects
I have sheet with data in columns (range "A" to "M"), the data in ranges("A"&"B") start from row 7 to row 23 down , the data in ranges("C","E" & "G”) start from row 2 downward to row 27 , the data in ranges("D" "F" &"H") start from row 10 down to row 29. the data in ranges("I" "K" &"M") start from row 4 down to row 25columns (“J” & “L”) are empty no data .
The problem is that every week the information can be different in 3 aspects
- the numbers of columns with data
- location of the starting data in the column downward
- location of the ending data in the column
i.e some week the data can be from range A to W, when in ranges (A&B) start from row 4 downward till row 18 , and range (("C","E" & "G”) start from row 5 downward till row 25,ranges ( D &H) empty and so on
- the only thing that remain the same that every all data in every week start in column A
I need a macro that check every column (starting column A1-downword) find the first row and the last row with data in that column and move the data to range A2-downword and do the same in each column across the sheet until the last column with data so all data across is located from row 2 downward (A2,B2,C2 ….. and so on till the last column with data ). Furthermore, please do not forget the empty columns, in the loop. The empty columns can stay the same because I any way I need to insert empty columns between each two column with data and I already have the macro to that.
thank to everyone in advance for any assistance if you need more clarification please do not heisted to ask
Mike.M
- the numbers of columns with data