Selecting cells

L

Len Case

Hi,,,,,,could someone help with this please.
I have 10 rows of 6 cells and I also have 10 rows of 40 cells with the col
number of the cells above ie: 12345678.
Some of the cells are blank and I want to to choose 6 of those blank cells
and be able to put the col number from the top
of each chosen cell into the row of 6 cells.
Also, the position of each blank cell will be different in each row.

1 2 3 4 5 6 1 2 3 4 5
6 7 8 9 10 11 12 13 14 15 etc
Here I want to choose 2 5 8 9 11 12 x x x
x x x x
here 1 5 6 9 11 15 x x
x x x x x
Thankyou for any help with this
Len
 
D

Don Guillett

If I understand your request, this will fill in the column titles of each
column.

Sub fillinfromtoprow()
Dim c As Range
For Each c In Selection
c.Value = Cells(1, c.Column)
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top