Excelerate2004
Programmer
I'm wondering if I could have some help in trying to set up this procedure to subtract 2 cells and then divide.
The code is as follows:
Dim rngLastcell As Integer
With Sheets("affy data")
For z = 2 To rngLastcell
'(L2-N2)/K2
Cells(z, "O").Value = .Range("L" & _ z).Value - .Range("N" & z).Value / .Range("K" & z).Value
Next z
End With
The Troublesome part comes here:
Cells(z, "O").Value = .Range("L" & z).Value - .Range("N" & z).Value / .Range("K" & z).Value
This is the formula I'd actually like to execute:
(L2-N2)/K2
Thanks,
The code is as follows:
Dim rngLastcell As Integer
With Sheets("affy data")
For z = 2 To rngLastcell
'(L2-N2)/K2
Cells(z, "O").Value = .Range("L" & _ z).Value - .Range("N" & z).Value / .Range("K" & z).Value
Next z
End With
The Troublesome part comes here:
Cells(z, "O").Value = .Range("L" & z).Value - .Range("N" & z).Value / .Range("K" & z).Value
This is the formula I'd actually like to execute:
(L2-N2)/K2
Thanks,