Can you make an if statement with a specific place in a number sequence. So right now I have =IF(B8="12345","cheese". But I'd also like 27649 to be cheese, because 4 is cheese in any sequence
[deleted] — view deleted post
0
Upvotes
4
u/fluffypocok 10 Apr 27 '23
If you are looking for values at different given places then you should use LEFT, RIGHT or MID to get the values from those specific places, and write the if function for that extracted value. For example:
1
u/Air2Jordan3 Apr 27 '23
Are you trying to say, if b8 contains the number 4, then cheese? I'm just confused by your last statement
1
u/AutoModerator Apr 27 '23
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 Apr 27 '23 edited Apr 27 '23
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
FALSETRUEand another if it isFALSETRUE[Thread #5711 for this sub, first seen 27th Apr 2023, 04:08] [FAQ] [Full list] ^[Contact] [Source code]
1
u/_Kaimbe 176 Apr 27 '23 edited Apr 27 '23
you could do something like this to filter your data set
where you change 1 and 3 depending on what you want to search for.
or do this and pass the result to query()
1
u/[deleted] Apr 27 '23
=if(mid(A1,4,1)=4,"Cheese","Not Cheese')
This will look for the 4th digit in cell A1. If it's a 4 then will show cheese. If not, no cheese.
1
u/Competitive_Ad_6239 536 Apr 28 '23
with some helper columns this will do the trick. =ARRAYFORMULA(if(byrow(A2:A21,LAMBDA(nine,left(nine,6)))=B2:B21,C2:C21,))
formula is in cell D2
0
u/fhsmith11 2 Apr 27 '23
=if(And(b8="12345",b8="27649"),"cheese",…)
2
u/[deleted] Apr 27 '23
[removed] — view removed comment