0
votes

I have data of 2 columns in sheet1 which a macro copies to sheet 2 and remove the same from sheet1! what I want is after macro paste data in sheet2 to there is a 3rd column viz status, this status column should be filed with status "updated". Sheet1 (POL)

Sheet2 where the data and macro button is

So after I run the macro the data is pasted in sheet2 but I also want that status column to be filled automatically as Updated. Macro copy-pastes the data into sheet2 but does not update the status column!!! Please help.... This is the error I get

1

1 Answers

0
votes

you cannot test a range of value in the same time in your if statement. That's why you have "Type mismatch".

Please try to use a for statement instead :

for i = 2 to 100
    if range("B" & i).value = "FST" then
        range("C" & i).value = "updated"
    end if
next