macro issue

  • Thread starter Thread starter project manager
  • Start date Start date
P

project manager

i have a macro which throws up an error message when i run it, dont have the
whole code here but the problem line is:

else
range("R" & i).value = range("M" & i) * range("L" & i)
end

'i = target.row

i basically want the target row R to equal target row m times target row L.
 
Try putting Value at the end:

range("R" & i).value = range("M" & i) * range("L" & i).Value
 
Actually try putting 2 Value:

range("R" & i).value = range("M" & i).Value * range("L" & i).Value
 
range(CStr("R" & i)).value = range(CStr("M" & i)).Value * range(CStr("L" &
i)).Value

or my preference

Cells(i,"R").Value = Cells(i,"M").Value * Cells(i,"L").Value
 
sorry they do have value at the end its error miss match 13 if that rings a
bell...
 
Make sure that both range("M" & i).Value and range("L" & i).Value have
numeric values and note text values
 
else
if isnumeric(range("m" & i).value) _
and isnumeric(range("L" & i).value) then
range("R" & i).value = range("M" & i).value * range("L" & i).value
else
range("R" & i) .value = "At least one is non-numeric!"
end if
end
 
Back
Top