+ Reply to Thread
Results 1 to 6 of 6

Formula to check range cell if match then check the cell value and return true or false

  1. #1
    Registered User
    Join Date
    04-30-2014
    Location
    england
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    63

    Question Formula to check range cell if match then check the cell value and return true or false

    Hi there as per title I would like to run through below under a single cell. However I couldn't figure out which direction should I go to get the exact outcome.

    Here is the logic checklist I wanted to do and return the outcome:
    1) Staff A have 5 columns and each have 7 working days ranging C6:P6, C15:P15, C24:P24, C33:P33 & C42:P42

    2) The code need if these range of row C6:P6, C15:P15, C24:P24, C33:P33 & C42:P42 contains the word "PH" or "初一" or "初二" if match any of the range then it need to check the 5 row under Staff A row which is C5:P5, C14:P14, C23:P23, C32:P32 & C41:P41

    3a) As my attached example worksheet: G5 column contain the word "PH" then the formula need to check Staff A within the same column which is G6 does it have any words contain "Off" or "Close" or "AL", if contain any of the word then it should return value of 0 else it return the value of 1, in this case column G6 doesn't contain any of the words hence it should return 1.
    3b) Next check found the cell of M32 contain the word "初一", therefore the code need to check Staff A under the cell of M33 contains any of these word "Off" or "Close" or "AL", if contain any of the word then it should return value of 0 else it return the value of 1, in this case column M33 contain the word "Close" hence it should return 0.
    3c) Next check found the cell of O32 contain the word "初二", therefore the code need to check Staff A under the cell of O33 contains any of these word "Off" or "Close" or "AL", if contain any of the word then it should return value of 0 else it return the value of 1, in this case column O33 doesn't contain any of the words hence it should return 1.

    4) After checking all 5 rows for Staff A, it need to Sum up the finding, in this case the finding found 1+0+1 hence the answer 2 should be at the cell S6.

    5) These method of checking need to apply to Staff B, Staff C, Staff D, Staff E & Staff F.

    I thinking of vlookup but it doesn't seems to work with the logic and direction I want hence I need expert advice is it possible for me to achieve above result without using VBA Macro coding?

    Thank you for your time

    this question also asked by me in mrexcel forum: https://www.mrexcel.com/board/thread...false.1127452/
    Last edited by lazyserv; 03-14-2020 at 02:56 AM. Reason: added crosslink in another forum

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Formula to check range cell if match then check the cell value and return true or fals

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)

  3. #3
    Registered User
    Join Date
    04-30-2014
    Location
    england
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    63

    Re: Formula to check range cell if match then check the cell value and return true or fals

    Hi there,

    added the link.

  4. #4
    Registered User
    Join Date
    04-30-2014
    Location
    england
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    63

    Re: Formula to check range cell if match then check the cell value and return true or fals

    Since got no reply, I use the conventional way to achieve my desired result, the code as below:

    Please Login or Register  to view this content.
    CNY_PH is the name range I set for the criteria while noOFF is the name range I set for the cross check.

    Any simplified method than above are most welcome, else Mods please close the thread. thanks

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Formula to check range cell if match then check the cell value and return true or fals

    Administrative Note:

    Please remember that those who help here do so voluntarily and of their own goodwill. They live in many different time zones and many will be out at work right now if they are not asleep on the other side of the globe. This is not a paid 'service': members will help when they are ready and able to do so, and not 'on demand'. Please do not try to put pressure of time on anyone here: if you get the help you need today, that's fine, but you really should not count on it. Thanks for your understanding and patience.

  6. #6
    Registered User
    Join Date
    04-30-2014
    Location
    england
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    63

    Re: Formula to check range cell if match then check the cell value and return true or fals

    Quote Originally Posted by Pepe Le Mokko View Post
    Administrative Note:

    Please remember that those who help here do so voluntarily and of their own goodwill. They live in many different time zones and many will be out at work right now if they are not asleep on the other side of the globe. This is not a paid 'service': members will help when they are ready and able to do so, and not 'on demand'. Please do not try to put pressure of time on anyone here: if you get the help you need today, that's fine, but you really should not count on it. Thanks for your understanding and patience.
    Your Administrative Note particularly the bold part doesn't sounds polite to me.

    Please do read my reply on above I wrote "Since got no reply, I use the conventional way to achieve my desired result, the code as below:" and I even paste the code in so that it will benefit other users in future should they meet the similar issues with what I encounter.

    Please note that I don't simply bump the thread and said "When I only can get an answer for the problem which I face now?" or wrote my reply as "Since no one bother to help, I use the conventional way to achieve my desired result, the code as below:", if I write this kind of reply I got no issue with your Administrative Note remarks.
    Last edited by lazyserv; 03-14-2020 at 04:12 AM.

+ 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. [SOLVED] Match formula to search range of columns to return True or False result
    By Twaddy006 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2015, 05:42 PM
  2. [SOLVED] VBA Check Box to return crew members name instead of true or false.
    By reinventingthewheel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2015, 05:10 PM
  3. Replies: 3
    Last Post: 09-28-2014, 08:14 PM
  4. Replies: 1
    Last Post: 06-05-2014, 03:15 AM
  5. Check font color and return a True or False
    By randolphoralph in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-21-2013, 09:13 PM
  6. Check four conditions return TRUE or FALSE
    By mkvassh in forum Excel General
    Replies: 6
    Last Post: 11-16-2009, 07:26 AM
  7. Macro to check range, if false check another range until true, then copy
    By jayers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2009, 04:19 PM

Tags for this Thread

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