I'm having trouble generating a logical structure (If) to validate some data. It's for a search. follows the explanation:
-
There are two columns ( B and H ). In the B column there are all Brazilian municipalities and in column H there are not all (but most).
TheIcolumncontainsthegradesobtainedbythemunicipalitiesintheHcolumn
- TheCcolumnshouldreceiveallthedataintheIcolumnintheirrespectivemunicipalities
- AsintheBcolumntherearemorecountiesthanintheHcolumn(aspreviouslyquoted)IamtryingtocreateaVBArulethatcomparestheBcolumnwithH,ifthemunicipalitiescomparedarethesame,theIcolumndatawillbepassedtotheCcolumninyourmunicipality
- Ex:ComparesB2withH2,iftheyareequal,C2receivesI2.
- ItriedtodoinVBAbutasIcouldnotgetanywherenearthegoal,Idonotconsideritnecessarytopostthecode(whichismessyandnotcommented).IfanyoneknowsawaytodoitwithoutbeingVBA,withoutproblems,theimportantthingformeistheresult.
Photooftheexpectationofhowtostay:
OBS: The red townships in the B column are those that are not H
The D and E columns can be disregarded, and I understand how I can do one for them.