+ Reply to Thread
Results 1 to 4 of 4

A formula extracts a number that meets a few conditions

  1. #1
    Registered User
    Join Date
    04-16-2015
    Location
    Simeria
    MS-Off Ver
    2021
    Posts
    97

    A formula extracts a number that meets a few conditions

    Hi

    I need with a formula to extracts a number that meets a few conditions;
    The searched number must be part of both the short range and the long range
    The formula searches for a common number in the short range F8: F12 and long range B8: B32 if it finds 2 or more numbers will give the
    number on the row with the highest order number. If no common number is found in the 2 ranges, the result will be 0 or blank.
    then the formula will look for a common number in the short range F13: F17 but the long range will remain the same B8: B32

    and so on


    please see the file.
    Attached Files Attached Files
    Last edited by pedersenn; 05-22-2019 at 12:06 AM.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: A formula extracts a number that meets a few conditions

    If I've understood... and assuming XL2007 per profile:

    J8: =IFERROR(LOOKUP(9.99E+307,MATCH(B$8:B$32,OFFSET(F$8:F$12,5*(ROWS(J$8:J8)-1),0),0),$A$8:$A$32),"")
    copied across J8:L12

    if you need to use ; delimiters then:

    J8: =IFERROR(LOOKUP(9.99E+307;MATCH(B$8:B$32;OFFSET(F$8:F$12;5*(ROWS(J$8:J8)-1);0);0);$A$8:$A$32);"")
    copied across J8:L12

  3. #3
    Registered User
    Join Date
    04-16-2015
    Location
    Simeria
    MS-Off Ver
    2021
    Posts
    97

    Re: A formula extracts a number that meets a few conditions

    thank you

    the formula works good but i don't know how to modify the formula if i want the short range to be 6,7 or 8? i think if i replace 5* with 6* ok?

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: A formula extracts a number that meets a few conditions

    ...i think if i replace 5* with 6* ok?
    yes, that is correct

    if this something you will change regularly you may find it easier to replace the number with a cell reference - e.g. $Z$1* where Z1 holds the number (5,6 etc).
    (obviously change the cell reference from $Z$1 to wherever it makes sense to store the number)

+ 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] A vba code that extracts a specific text along with the next 8 digit number that follows
    By ermias in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-04-2018, 08:45 AM
  2. Replies: 0
    Last Post: 07-04-2018, 05:51 AM
  3. Replies: 2
    Last Post: 05-02-2016, 09:54 PM
  4. Formula that counts number of unique text values if it meets criteria
    By ruledwritingpaper in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2014, 02:57 PM
  5. [SOLVED] Changing Cells & Text Color When Formula Meets Certain Conditions
    By VICTOR55 in forum Excel General
    Replies: 3
    Last Post: 12-02-2013, 02:43 AM
  6. formula required which meets 12 conditions
    By kiany406 in forum Excel General
    Replies: 2
    Last Post: 06-27-2011, 07:41 AM
  7. Replies: 3
    Last Post: 03-23-2010, 06:50 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