If "text" is in cell L151 then "POSTED" (1 Viewer)

xpander

New member
Local time
Today, 07:42
Joined
Mar 21, 2024
Messages
4
Can you use INSTR or something in an Access query to make it so that, for example, If "text" is in cell L151 then "POSTED" else "Not POSTED" ?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:42
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

I think you can as well as trying to use the LIKE operator. Give it a shot and let us know how it goes.
 

xpander

New member
Local time
Today, 07:42
Joined
Mar 21, 2024
Messages
4
=IF(INSTR(1,[L151],"text")<>0, "POSTED","Not POSTED")
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:42
Joined
Oct 29, 2018
Messages
21,473
=IF(INSTR(1,[L151],"text")<>0, "POSTED","Not POSTED")
In a query, you wouldn't use the equals sign and you would use the IIF() function and not IF().
 

KitaYama

Well-known member
Local time
Today, 20:42
Joined
Jan 6, 2022
Messages
1,541
Can you use INSTR or something in an Access query to make it so that, for example, If "text" is in cell L151 then "POSTED" else "Not POSTED" ?
Excel has COUNTIF instead of InStr.

=IF(COUNTIF(L151,"*Text*"),"Posted","Not Posted")
 
Last edited:

Users who are viewing this thread

Top Bottom