Results 1 to 3 of 3
  1. #1
    xpander is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2024
    Posts
    1

    Change a value if a string is contained in another cell


    If column Words contains *text* then update column Code to "POSTED" otherwise do not update column Code

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This can be calculated when needed, not necessary to actually save into table. But if you really must edit all records:

    UPDATE tablename SET Code = "POSTED" WHERE InStr(Words, "something") > 0;

    Do you want to match the literal value of "*text*"? Or is this some variable input?

    Oh, so this is Excel not Access?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Adding a Cell Range to a String Variable
    By RunTime91 in forum Access
    Replies: 3
    Last Post: 01-27-2018, 02:38 PM
  2. Replies: 14
    Last Post: 01-15-2015, 02:41 PM
  3. Replies: 3
    Last Post: 09-16-2013, 01:05 PM
  4. Replies: 6
    Last Post: 09-10-2013, 08:37 AM
  5. change cell color
    By bishop743 in forum Programming
    Replies: 0
    Last Post: 02-01-2009, 11:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums