+ Reply to Thread
Results 1 to 4 of 4

Generate value based on certain criteria

  1. #1
    Forum Contributor
    Join Date
    10-18-2019
    Location
    Mumbai
    MS-Off Ver
    OFFICE 2010
    Posts
    427

    Post Generate value based on certain criteria

    My 2 input ranges are D2:K2; D5:K5.
    D5:K5 generates either of 0 or 1 with a condition that at a time there would be maximum one “1” in the entire range.
    Output cell is T2
    T2=D2:K2 where the analogous cell in the range D5:K5 is 1
    If all D5:K5 is 0 (there is no “1”), then T2=0
    How to accomplish? Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,466

    Re: Generate value based on certain criteria

    Maybe this?

    =IFERROR(INDEX(D2:Q2,MATCH(1,D5:Q5,0)),0)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,680

    Re: Generate value based on certain criteria

    For this example:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,680

    Re: Generate value based on certain criteria

    Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Generate cells with a certain value in a range based on certain criteria
    By bittubadri in forum Excel General
    Replies: 5
    Last Post: 01-26-2022, 01:34 PM
  2. Code to generate new ID based on criteria
    By nav112 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2021, 04:58 AM
  3. [SOLVED] Formula to Generate a cell's value based on certain criteria
    By stacymyers11 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-01-2020, 04:52 PM
  4. [SOLVED] Generate a list based on meeting certain criteria.
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-01-2015, 01:32 PM
  5. Generate a list based on meeting a criteria
    By nekomi15 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-02-2015, 02:31 PM
  6. Generate an Instruction Sheet Based on Criteria
    By thenoxus1 in forum Excel General
    Replies: 1
    Last Post: 01-16-2015, 04:12 PM
  7. Generate random # of days based on other criteria
    By Georgia Golfer in forum Excel General
    Replies: 3
    Last Post: 09-17-2010, 02:00 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