tnertster
04-17-2016, 05:03 PM
Hi all! Thanks for the help! Been years since i have done any VBA in fact about all I can recall is use ' for comments - so need some help w simple problem in excel.
Straight to it:
>>>>>>>>>>>>>
'need an excel macro that checks each value in a column and changes the
'value in another column based on a condition....
'For rows 6 thru 4000:
'Check the value in column N row r# ( r# being the number of the row currently being evaluated)
'and if column N row r# is empty then the value of column G row r# remains unchanged
'else set value Gr# = "USED"
Dim score As Integer, result As String
score = Range("G$").Value
If score Then 'If value in column N row n is not nil then column G row n = "USED"
result = "pass"
Else
result = "fail" 'value in column G row n remains unchanged
End If
Range("B1").Value = result
>>>>>>>>>>>>
Thanks again!!!
cheers
Straight to it:
>>>>>>>>>>>>>
'need an excel macro that checks each value in a column and changes the
'value in another column based on a condition....
'For rows 6 thru 4000:
'Check the value in column N row r# ( r# being the number of the row currently being evaluated)
'and if column N row r# is empty then the value of column G row r# remains unchanged
'else set value Gr# = "USED"
Dim score As Integer, result As String
score = Range("G$").Value
If score Then 'If value in column N row n is not nil then column G row n = "USED"
result = "pass"
Else
result = "fail" 'value in column G row n remains unchanged
End If
Range("B1").Value = result
>>>>>>>>>>>>
Thanks again!!!
cheers