+ Reply to Thread
Results 1 to 14 of 14

Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

  1. #1
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Hi all

    I have work book with 02 sheet: data and result.
    Sheet(data) have file name of folder in column(A) form A2 to last row (about over 200 rows)
    Sheets(result) have 6 character each cell from B2 to lastrow, have 8 characters each cell from C1 to last column

    Now I want to have macro to do that:
    For each cell in sheet(result).range(C2,cells(lasrow, lastcolumn))
    if value meet in sheet(data).range(A2:A)
    cell.value = "YES"
    else
    cell.value = "NO"

    Please me to do that, I attachment file belove for my idea. Thanks./.
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Give this a go...
    Please Login or Register  to view this content.
    Last edited by sintek; 05-04-2019 at 12:07 PM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Hi,

    One way as an array formula entered with Ctrl--Shift--Enter in C2 Copied across and down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Use a Conditiona format to paint the cell red

    As a macro just get the macro to enter the formula for you.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Thanks @sintek code work but the font when mark "NO" still black color, can you have some code to "NO" is red color?

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    No way I know of to pass color via Array...Only can use conditional format per cell or...
    Please Login or Register  to view this content.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Quote Originally Posted by sbv1986 View Post
    Thanks @sintek code work but the font when mark "NO" still black color, can you have some code to "NO" is red color?
    Never use code when there is a perfectly workable Excel solution. In this case conditional formatting.
    There's a big time overhead each occasion you access a cell from VBA.

  7. #7
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Thanks all, because range dymanic so I want to do thí by VBA code.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    ...............................................
    Thanks.gif

  9. #9
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    @sintek

    When I change value row to column code yellow line "Temp(x, xx) = "NO"" with info: subscrips out of range.

    How can I fixed it?
    Attached Files Attached Files

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Code was written for your other sample file setup...This is a new setup...
    Change...
    Please Login or Register  to view this content.
    To
    Please Login or Register  to view this content.
    Last edited by sintek; 05-05-2019 at 04:56 AM.

  11. #11
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Thanks again, you're kind.

    I added reputation yesterday so I can't add again today ^^!

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Anytime...Good luck...

  13. #13
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Quote Originally Posted by sbv1986 View Post
    Thanks all, because range dymanic so I want to do thí by VBA code.
    Juts because a range is dynamic doesn't mean you necessarily need VBA. Just create an Excel dynamic range name and use that rather than a specific range.

    e.g. with a name 'List' defined as
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the array formula in C2 then becomes
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Re: Help to check data with miltiple conditions then mark "YES" if meet else mark "NO"

    Quote Originally Posted by Richard Buttrey View Post
    Juts because a range is dynamic doesn't mean you necessarily need VBA. Just create an Excel dynamic range name and use that rather than a specific range.

    e.g. with a name 'List' defined as
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the array formula in C2 then becomes
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks Richard, I'll try your solution.

+ 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. a formula that pulls data from an array to mark a single cell "X"
    By cstewart37 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2014, 02:33 PM
  2. Automate Series Number With Adding Mark (.) or mark "-"
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2014, 12:38 PM
  3. [SOLVED] Counting data only contains text (ignore mark "-" & "")
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-12-2014, 09:45 PM
  4. Replies: 3
    Last Post: 08-28-2012, 10:49 AM
  5. Inserting a "check Mark"
    By C Holmes in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-29-2010, 07:36 AM
  6. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  7. Replies: 6
    Last Post: 01-08-2006, 06:20 PM

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