Help with formula

LaurenJez

New Member
Joined
Apr 19, 2023
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hello. I need a formula that looks for the value in a cell and compares it to a range of cells to throwback if there is a match anywhere in the range of cells. I would also like the formula to exclude considering blank cells so I do not end up with false No Matches. Example of the data is below.

Layman's Terms:
I want to know if A2 (apple) appears anywhere in D2:F2. In this example, I would expect Match.
I want to know if B4 (banana) appears anywhere in D4:F4. In this example, I would expect Match.
I want to know if the value in C5 (melon) appears anywhere in D5:F5. In this example, I would expect No Match

Column AColumn BColumn CColumn DColumn EColumnn F
AppleApple
OrangeOrange
AppleBananaAppleBanana
OrangeKiwiMelonOrangeKiwi
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
not sure i understand why the changes in the cell reference and the range ?

countif()>0 would work within an IF

I would also like the formula to exclude considering blank cells so I do not end up with false No Matches.
but i'm not sure i understand fully your question
 
Upvote 0
Hi & welcome to MrExcel.
Maybe
Fluff.xlsm
ABCDEFG
1
2AppleAppleMatch
3OrangeOrangeMatch
4AppleBananaAppleBananaMatch
5OrangeKiwiMelonOrangeKiwiNo Match
Main
Cell Formulas
RangeFormula
G2:G5G2=IF(COUNTIFS(D2:F2,TAKE(FILTER(A2:C2,A2:C2<>""),,-1)),"Match","No Match")
 
Upvote 0
not sure i understand why the changes in the cell reference and the range ?

countif()>0 would work within an IF


but i'm not sure i understand fully your question
I want to know if the value in A2 shows up anywhere in D2 to F2
I want to know if the value in B2 shows up anywhere in D2 to F2
I want to know if the value in C2 shows up anywhere in D2 to F2

Since in the first row, B2 and C2 is blank, I don't want there to be a "Match" since there are also blanks in D2 to F2
 
Upvote 0
Do all 3 have to match, or just one of them?
 
Upvote 0
Hello. I need a formula that looks for the value in a cell and compares it to a range of cells to throwback if there is a match anywhere in the range of cells. I would also like the formula to exclude considering blank cells so I do not end up with false No Matches. Example of the data is below.

Layman's Terms:
I want to know if A2 (apple) appears anywhere in D2:F2. In this example, I would expect Match.
I want to know if B4 (banana) appears anywhere in D4:F4. In this example, I would expect Match.
I want to know if the value in C5 (melon) appears anywhere in D5:F5. In this example, I would expect No Match

Column AColumn BColumn CColumn DColumn EColumnn F
AppleApple
OrangeOrange
AppleBananaAppleBanana
OrangeKiwiMelonOrangeKiwi
Column AColumn BColumn CColumn DColumn EColumnn FIdeal formula would return Column A vs. Colums D to FIdeal formula would return Column B vs. Colums D to FIdeal formula would return Column C vs. Colums D to F
AppleAppleMatch
OrangeOrangeMatch
AppleBananaAppleBananaMatchMatch
OrangeKiwiMelonOrangeKiwiMatchMatchNo Match
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGHI
1
2AppleAppleMatch  
3OrangeOrangeMatch  
4AppleBananaAppleBananaMatchMatch 
5OrangeKiwiMelonOrangeKiwiMatchMatchNo Match
Main
Cell Formulas
RangeFormula
G2:I5G2=IF(A2="","",IF(COUNTIFS($D2:$F2,A2),"Match","No Match"))
THAT IS IT! Worked like a charm. Thank you SO much, I really really appreciate it! Side question, what does putting "$" do to the formula?
 
Upvote 0
It locks the columns so they don't change when you drag the formula across.
 
Upvote 0

Forum statistics

Threads
1,215,325
Messages
6,124,252
Members
449,149
Latest member
mwdbActuary

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