+ Reply to Thread
Results 1 to 10 of 10

Formula if one or more the cells within a selection of cells contains text then change tex

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 365
    Posts
    20

    Formula if one or more the cells within a selection of cells contains text then change tex

    Hi All,

    Its been a while since i was here.
    I hop you all are okay.

    I am working on a daily management sheet.
    I am looking for a function or formula that changes a cells values when one or more cells of a selection of cells has a certain values.

    For example:

    If one of the cells in range (F2:F8) has text "one" cell Z1 changes into text "Two".

    I hope its clear to some one. As i said my excel is a bit rusty at the moment.


    Thanks in advance,

    Johan

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,184

    Re: Formula if one or more the cells within a selection of cells contains text then change

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 365
    Posts
    20

    Re: Formula if one or more the cells within a selection of cells contains text then change

    My Apologies,

    I created a small workbook to explain.
    What i would like to accomplish:
    On employee sheet you can select a color per employee per day. And also for managers.

    if on day 1 all employees are green, on the dashboard employees day 1 should be green,
    if one or more of the employees is orange and the rest is green, on the dashboard it should be orange,
    if one or more employees are red, on the dashboard it should show red.

    I hope this makes sense.\

    If all went well, i added the workbook.

    Thanks,

    Johan
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formula if one or more the cells within a selection of cells contains text then change

    Maybe something like:
    =IF(COUNTIF(F2:F8,"*ONE*"),"TWO","")

  5. #5
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formula if one or more the cells within a selection of cells contains text then change

    Now I see your example. Try this in B2 and copy across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!

  6. #6
    Registered User
    Join Date
    10-25-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 365
    Posts
    20

    Re: Formula if one or more the cells within a selection of cells contains text then change

    Unfortunately i get this error. Am i doing something wrong or is this an issue with my excel version.
    Attached Images Attached Images

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,184

    Re: Formula if one or more the cells within a selection of cells contains text then change

    You may need to change "," (comma) to ";" (semi-colon) in the formula

  8. #8
    Registered User
    Join Date
    10-25-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 365
    Posts
    20

    Re: Formula if one or more the cells within a selection of cells contains text then change

    It works like a charm, thanks so much, got one more adjustment.

    In this formula it look to a fixed group of cells, now id like the same function but instead of using a fixed group of cells,
    i want to use rows when cell A of that row had a certain text in it.

    In my test workbook i added a column A (People) so i want the formula to use the row of where Cell A had the value Engineer instead of a fixed group of cells.

    i hope this makes sense.

    Many thanks in advance again.

    With kinds regards,

    Johan
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formula if one or more the cells within a selection of cells contains text then change

    You're welcome.
    I changed to COUNTIFS, so as to include the new column and expand the range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It would be smart to enter text Engineer in a cell and use that cell as reference in the formula, so you can quickly check for other titles.

  10. #10
    Registered User
    Join Date
    10-25-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 365
    Posts
    20

    Re: Formula if one or more the cells within a selection of cells contains text then change

    Hey,

    Thanks for all the support, got a question again, in the attachment document, i want the yellow part the stay where it is at all times, so both the rows and columns. I tried this with freezing panes, but them its always one of the two panes that frezze.
    I am makes a files where the page layout should stay where it is and the data cells can move in both directions.

    Anyone an idea?

    Many thanks

    Johan
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 12-23-2015, 02:08 PM
  2. [SOLVED] Worksheet Selection change for many cells
    By Jamesera27 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2015, 06:42 PM
  3. [SOLVED] Change selection of cells to selection of rows
    By olwy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-13-2014, 11:38 AM
  4. VBA to Change Formats of Cells Within a Selection
    By excelsior123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2013, 10:09 AM
  5. Change all formula cells to text for entire worksheet
    By theletterh in forum Excel General
    Replies: 2
    Last Post: 07-31-2012, 02:37 PM
  6. How to change cells in Selection to values
    By alexxgalaxy in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 09-17-2011, 01:51 PM
  7. macro to change cells on change of selection
    By scottwilsonx in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-13-2005, 04:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1