dimanche 19 avril 2015

Searching and comparing various values using VBA

I have to create a macro which will:



  1. Get the value from the cell A1 search this value in column C.

  2. If the value in cell A1 exists in column C, the macro needs to be compare the value in cell B1 with values in column D.

  3. If the value in cell A1 exists in column C AND the value in cell B1 exists in column D, then the text "Values found" should appear in cell E1.


The above needs to happen for all non empty rows in column A.


I was trying to use the following formula:



=IF(ISERROR(MATCH(A2,$C$2:$C$138,0)),"Load number not found","Load number found")


But it not working as I want. I have limited access to internet so I can't check all web sites. Would you please help me. Thanks a lot.


Aucun commentaire:

Enregistrer un commentaire