X xpander New member Local time Today, 03:21 Joined Mar 21, 2024 Messages 4 Mar 21, 2024 #1 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" ?
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, 00:21 Joined Oct 29, 2018 Messages 22,508 Mar 22, 2024 #2 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.
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.
X xpander New member Local time Today, 03:21 Joined Mar 21, 2024 Messages 4 Mar 22, 2024 #3 =IF(INSTR(1,[L151],"text")<>0, "POSTED","Not POSTED")
theDBguy I’m here to help Staff member Local time Today, 00:21 Joined Oct 29, 2018 Messages 22,508 Mar 22, 2024 #4 xpander said: =IF(INSTR(1,[L151],"text")<>0, "POSTED","Not POSTED") Click to expand... In a query, you wouldn't use the equals sign and you would use the IIF() function and not IF().
xpander said: =IF(INSTR(1,[L151],"text")<>0, "POSTED","Not POSTED") Click to expand... In a query, you wouldn't use the equals sign and you would use the IIF() function and not IF().
theDBguy I’m here to help Staff member Local time Today, 00:21 Joined Oct 29, 2018 Messages 22,508 Mar 22, 2024 #5 theDBguy said: In a query, you wouldn't use the equals sign and you would use the IIF() function and not IF(). Click to expand... You are using Access and not Excel, right?
theDBguy said: In a query, you wouldn't use the equals sign and you would use the IIF() function and not IF(). Click to expand... You are using Access and not Excel, right?
X xpander New member Local time Today, 03:21 Joined Mar 21, 2024 Messages 4 Mar 22, 2024 #6 =IF(L151 Like 'text',"POSTED") got me nowhere.
X xpander New member Local time Today, 03:21 Joined Mar 21, 2024 Messages 4 Mar 22, 2024 #7 theDBguy said: You are using Access and not Excel, right? Click to expand... OH, Sorry. I AM in Excel. Ergh
theDBguy said: You are using Access and not Excel, right? Click to expand... OH, Sorry. I AM in Excel. Ergh
theDBguy I’m here to help Staff member Local time Today, 00:21 Joined Oct 29, 2018 Messages 22,508 Mar 22, 2024 #8 xpander said: OH, Sorry. I AM in Excel. Ergh Click to expand... No worries. We can move it.
K KitaYama Well-known member Local time Today, 16:21 Joined Jan 6, 2022 Messages 2,010 Mar 22, 2024 #9 xpander said: 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" ? Click to expand... Excel has COUNTIF instead of InStr. =IF(COUNTIF(L151,"*Text*"),"Posted","Not Posted") Last edited: Mar 22, 2024
xpander said: 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" ? Click to expand... Excel has COUNTIF instead of InStr. =IF(COUNTIF(L151,"*Text*"),"Posted","Not Posted")
Gasman Enthusiastic Amateur Local time Today, 08:21 Joined Sep 21, 2011 Messages 16,618 Mar 22, 2024 #10 Crossposted https://www.accessforums.net/showthread.php?t=89554