+ Reply to Thread
Results 1 to 8 of 8

Check for three values and return other value if found

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Luxembourg, Luxembourg
    MS-Off Ver
    Excel 2019
    Posts
    80

    Check for three values and return other value if found

    In range F1:F60 I will have to put once 1, 2 and 3 but the postions of those value may vary

    Now I need a formula which fills all other 57 cells with a 0
    Last edited by akalien; 08-06-2012 at 05:21 AM.

  2. #2
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Check for three values and return other value if found

    Can you upload an example workbook and add comments flagging your desired output..
    Thanks,

    Bonny Tycoon


  3. #3
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Check for three values and return other value if found

    To the extent I understood your query, try this
    After typing in any 3 cells,
    Select the range F1:F60
    Select Ctrl+G ►Goto ►Special►Blanks
    Now you got all the 57 blank cells selected
    Now within the selection, type 0 and press Ctrl+Enter
    regards

    johnjohns

    When you are not sure where to go, every road takes you there!

  4. #4
    Registered User
    Join Date
    07-01-2010
    Location
    Luxembourg, Luxembourg
    MS-Off Ver
    Excel 2019
    Posts
    80

    Re: Check for three values and return other value if found

    Attached you'll find an example.

    The three fields in red appear each only once but the position is not everytime the same.

    All the rest in yellow should get a 0 when the 3, 2 and 1 are found in the list.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-01-2010
    Location
    Luxembourg, Luxembourg
    MS-Off Ver
    Excel 2019
    Posts
    80

    Re: Check for three values and return other value if found

    Great that's what I wanted to have but is there any way to do it automatically with a formula?

  6. #6
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Check for three values and return other value if found

    Would a macro do??

    If yes, then here you go.. Aftr entering 1, 2 or 3.. Highlight all 60 rows and then run the below macro -

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Check for three values and return other value if found

    Also you can record a macro while doing it manualy. Here is the result of my attempt

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Check for three values and return other value if found

    Hi Akalien,

    I understand that your query has been resolved. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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