[RESOLVED] Excel Gurus needed: Combine into one statement
I need to get these two together somehow, someway:
Don't know how since they use different cell ranges. Please, please, help I really need to move past this. Thanks!
VB Code:
' ----------first statement---------------
For Each MyCell2 In Sheet1.Columns("A").Cells
With MyCell2
If .Value = "" Then Exit For
If .Value = 574 _
Or .Value = 555 _
Or .Value = 510 Then
.Offset(0, 12).Value = .Offset(0, 8).Value * 1.1
End If
End With
Next MyCell2
'-------------second statement-------------
For Each MyCell3 In Sheet1.Columns("D").Cells
With MyCell3
If .Value = "" Then Exit For
If .Value <> "OMI" Then
.Offset(0, 9).Value = .Offset(0, 5).Value * 1.4503
Else
.Offset(0, 9).Value = .Offset(0, 5).Value
End If
End With
Next MyCell3
Re: Excel Gurus needed: Combine into one statement
I have no clue what you need to accomplish
Re: Excel Gurus needed: Combine into one statement
If cells in Column D don't equal "OMI" times value by 1.4503, but it the cells in Column A are 574, 555, or 510 then only times them by 1.1, else just keep the value from one cell and put it in another.
Re: Excel Gurus needed: Combine into one statement
You may need to put loop2 inside your loop1 then. Make sense?
Re: Excel Gurus needed: Combine into one statement
I figured it out! Thanks!