Excel 2013 VBA:

jedwardo

Board Regular
Joined
Aug 21, 2012
Messages
122
Hello Again,

In the highlighted text area I'm wanting the value of the first row on sheet1 from the active icell column. Can't figure out how to lift that value from the sheet. It's text in the cell as well that's being transfered, not a number.

Code:
Sub TestCode()Dim iCell As Range, ws As Worksheet
Set ws = Sheet6
Lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
    For Each iCell In Range("A2:BD3")
        With iCell
        If iCell.Interior.ColorIndex = 35 Then
            ws.Cells(Lastrow + 1, 1).Value = iCell.Value
            ws.Cells(Lastrow + 1, 1).Offset(0, 1).Value = iCell.Offset(0, 1).Value
            Lastrow = Lastrow + 1
        ElseIf iCell.Value <> "" And iCell.[COLOR=#000000]Interior.ColorIndex[/COLOR] = 3 Then
            ws.Cells(Lastrow + 1, 3).Value = [COLOR=#ff0000]What to put here[/COLOR]
            ws.Cells(Lastrow + 1, 10).Value = iCell.Value
            
            Lastrow = Lastrow + 1
        ElseIf iCell.Value <> "" And iCell.Interior.ColorIndex = 24 Then
            ws.Cells(Lastrow + 1, 8).Value = iCell.Value
            Lastrow = Lastrow + 1
        End If
        End With
        
    Next iCell
End Sub

Thanks,
Jordan
 
Last edited:

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