Hi, currently writing a VBA where if the value of range I10 in sheet name Main is equal to 1H, then the value of range ("B20") in sheet name Part 1 would be January
i use some basic function to return the value of reportprd , it shows "1H". Bt i don't know why the value of the of B20 just won't change to January. in fact it showing february, which is not correct
VBA Code:
sub working()
Dim reportprd as string
reportprd = thisworkbook.sheets("Main").Range("I10").value
if reportprd="1H" then
thisworkbook.sheets("Part 1").range("B20").value = "January"
else
thisworkbook.sheets("Part 1").range("B20").value="February"
End if
end sub
i use some basic function to return the value of reportprd , it shows "1H". Bt i don't know why the value of the of B20 just won't change to January. in fact it showing february, which is not correct