Trouble matching multiple cells

bug7467

New Member
Joined
Jan 27, 2016
Messages
15
Hello

I am having trouble deriving an IF statement worksheet formula for my problem. I am trying to see if my city and state matches my list in targeted cities and states. The tricky part is that both entries in my city list must match both entries in each individual row in target cities.

Any help is appreciated!

Capture_zpsjqg31zrk.png
[/URL][/IMG]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Here are a couple of options:

ABCDEFG
53Target CitiesCity ListMatch
54ChicoCACiceroILTRUETRUE
55Chula VistaCACiceroCAFALSEFALSE
56CiceroILClevelandOHTRUETRUE
57CincinnatiOHClevelandNYFALSEFALSE
58ClarksvilleTN
59ClearwaterFL
60ClevelandOH
61ClovisCA
62College StationTX
63

<tbody>
</tbody>
Sheet19

Worksheet Formulas
CellFormula
F54=COUNTIFS($A:$A,D54,$B:$B,E54)>0

<tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
G54{=ISNUMBER(MATCH(D54&"|"&E54,$A$54:$A$62&"|"&$B$54:$B$62,0))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



I'd go with the one in F54, the other is for future reference, or if you have a version of Excel prior to 2007.
 
Last edited:
Upvote 0
Here are a couple of options:

ABCDEFG
53Target CitiesCity ListMatch
54ChicoCACiceroILTRUETRUE
55Chula VistaCACiceroCAFALSEFALSE
56CiceroILClevelandOHTRUETRUE
57CincinnatiOHClevelandNYFALSEFALSE
58ClarksvilleTN
59ClearwaterFL
60ClevelandOH
61ClovisCA
62College StationTX
63

<tbody>
</tbody>
Sheet19

Worksheet Formulas
CellFormula
F54=COUNTIFS($A:$A,D54,$B:$B,E54)>0

<tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
G54{=ISNUMBER(MATCH(D54&"|"&E54,$A$54:$A$62&"|"&$B$54:$B$62,0))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



I'd go with the one in F54, the other is for future reference, or if you have a version of Excel prior to 2007.


Thank you very much!
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,064
Members
448,545
Latest member
kj9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top