vba - Creating a macro in Excel that compares two columns, answers in third column -


I have not found a suitable answer for this question and I am very new to VBA, so I hope someone Will help me out

I am trying to create a sub in my macro which compares a simple value between two columns, row to row If they are an exact match then it will populate a third column with "yes", otherwise it will say "no"

All columns are within an Excel table and have similar lines, the example of this would be the result (Not enough representative to post image):

Enter image details here

I was thinking like something for every statement, but I'm not sure that it's the right way How are made. Thank you for your time before times!

Compare the quick sub-root and the result between loops between 1 and 20 loops:

  i = 1 to 20. If Sheet 1. Ranges ("A" & amp; i) .value = sheet1. Range ("B" & amp; i) .value Then Sheet 1.Range ("C" & amp; i) .value = "No" Other Sheet 1. Range ("C" & amp; i) .value = "Yes" End If Next I   

Because it seems like using more learning, you can also refer to cells:

  i = 1 to 20 if sheets 1.cells (i, 1) .value = sheet1.cells (i, 2). Value then sheet 1.cells (i, 3) .value = "no" other sheet 1 cal (i, 3) .value = "yes" end if next   

you mention the boundary You can get the last line that is populated and then loop on it from 1:

  slow interval long interval = sheet 1 Category ("A999999") End (XLEEP). To end I = 1, if Sheet 1.Range ("A" and "I") .value = sheet1.Range ("B" and "I") Price then Sheet 1.Range ("C" & amp; i) .value = "No" Other Sheet1 Range ("C" & amp; i) .value = "Yes" End if Next I    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -