Excel 2012
<tbody>
</tbody>
The above is for illustration purposes only, cell references are not actual.
I am looking for a piece of code that when ran, will automatically drag and fill into blank columns, columns that actually have data in them.
The actual range is H1501:AP1501, this represents the yellow cells as above, if any cells in this range are blank, the whole column in the blank cell range
should be filled with the first column to the right that is not blank.
The code should account for a sequence of blank cells before encountering a cell with data in the range H1501:AP1501
The column range to be filled would be H1:H1501 , I1:I1501 and so on
I cannot just delete the blank columns as the above scenario runs all down the worksheet and across a far bigger range than the first given
so I will copy and amend the initial code to run in stages as I work down the worksheet.
I'm still completely new to code and an Excel newbie, so please bear that in mind when replying and forgive my lack of "Techspeak"
Thanks In Advance.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Column Header 1 | Column Header 2 | Column Header 3 | Column Header 4 | Column Header 5 | Column Header 6 | Column Header 7 | Column Header 8 | Column Header 9 | Column Header 10 | Column Header 11 | Column Header 12 | ||
2 | 9 | 11 | 11 | 91 | 652 | |||||||||
3 | Before | 3 | 123 | 9 | 65 | |||||||||
4 | Running | 10 | 4 | 98 | 36 | |||||||||
5 | Code | 281 | 25 | 55 | 25 | |||||||||
6 | 27 | 2 | 89 | 35 | ||||||||||
7 | 6 | 362 | 11 | 18 | ||||||||||
8 | 5 | 17 | 14 | 18 | ||||||||||
9 | 57 | 9 | 240 | 652 | 248 | 175 | 731 | |||||||
10 | ||||||||||||||
11 | ||||||||||||||
12 | Column Header 1 | Column Header 2 | Column Header 4 | Column Header 7 | Column Header 9 | Column Header 11 | Column Header 12 | |||||||
13 | 9 | 11 | 11 | 91 | 652 | |||||||||
14 | After | 3 | 123 | 9 | 65 | |||||||||
15 | Running | 10 | 4 | 98 | 36 | |||||||||
16 | Code | 281 | 25 | 55 | 25 | |||||||||
17 | 27 | 2 | 89 | 35 | ||||||||||
18 | 6 | 362 | 11 | 18 | ||||||||||
19 | 5 | 17 | 14 | 18 | ||||||||||
20 | 57 | 9 | 240 | 652 | 248 | 175 | 731 |
<tbody>
</tbody>
Sheet1
The above is for illustration purposes only, cell references are not actual.
I am looking for a piece of code that when ran, will automatically drag and fill into blank columns, columns that actually have data in them.
The actual range is H1501:AP1501, this represents the yellow cells as above, if any cells in this range are blank, the whole column in the blank cell range
should be filled with the first column to the right that is not blank.
The code should account for a sequence of blank cells before encountering a cell with data in the range H1501:AP1501
The column range to be filled would be H1:H1501 , I1:I1501 and so on
I cannot just delete the blank columns as the above scenario runs all down the worksheet and across a far bigger range than the first given
so I will copy and amend the initial code to run in stages as I work down the worksheet.
I'm still completely new to code and an Excel newbie, so please bear that in mind when replying and forgive my lack of "Techspeak"
Thanks In Advance.