Check colour of number, then populate cell

G

Guest

Hello there,

Please help! I have coloured certain numbers either blue or red. My
spreadsheet is as follows:
Column
A B C D E
Row1 12 30 17 25 2
Row2 32 18 4 11 41
Row3 3 26 19 39 12
Row4 27 19 21 3 16
Row5

I want to populate Row5 with values and I need Excel to look at each cell
and do the following:
- eg. Identify the column/s with no coloured number
- When this column/s is found, take the respective values in Row4 of the
column and populate Row5 cells from left to right.

Thanx for your help!
 
G

Guest

Try this:

Sub coupydown()
For i = 1 To 5
k = 0
For j = 1 To 4
If Cells(j, i).Font.ColorIndex = xlAutomatic Then
k = k + 1
End If
Next
MsgBox (k)
If k = 4 Then
Cells(5, i).Value = Cells(4, i).Value
End If
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