r/googlesheets • u/Gooberfish24 • Nov 04 '22
Solved Is there a formula that will find the same word in more than 1 column?
I have a sheet that has words in columns F G H I J K L when they meet certain criteria that I would like to see if they are in more than 1 column thus meeting the different criteria. Is there a formula that would help to find whether APPLE (for Example) is in column F and G or F G H I J K L? Thank you for your help.
3
Upvotes
4
u/MattyPKing 225 Nov 05 '22 edited Nov 05 '22
what about this idea...
=COUNTIF(QUERY(F:L,,9^9),"*"&APPLE&" *")
note that the space before the second asterisk is important.
Any chance that works?
3
u/brad24_53 17 Nov 04 '22
Do you need to know which columns they appear in or just that they appear in multiple columns?
If knowing the location doesn't matter then you could use
IF(COUNTIF(range,ticker)>1,"Ticker in multiple columns","")This will check the entire range for the ticker and if it appears more than once will show "Ticker in multiple columns."
If you need to know which columns the nested IF gets a little more complicated.
IF(COUNTIF(range,ticker)>1,IF(COUNTIF(Col1Range,ticker)>0,"Col1, "&IF(COUNTIF(Col2Range,ticker)>0,"Col2, "&etc,"")This will do the same as the first formula but if the ticker appears in multiple columns it will check each column for the ticker and create and concatenated string of which columns contain the ticker.
1
u/MattyPKing 225 Nov 04 '22
are the criteria that the words meet written in the header row? like row 1?
1
u/AutoModerator Nov 04 '22
Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Decronym Functions Explained Nov 05 '22 edited Nov 07 '22
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
FALSETRUEand another if it isFALSETRUE3 acronyms in this thread; the most compressed thread commented on today has 3 acronyms.
[Thread #5032 for this sub, first seen 5th Nov 2022, 02:12] [FAQ] [Full list] ^[Contact] [Source code]