+ Reply to Thread
Results 1 to 6 of 6

Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA or B

  1. #1
    Registered User
    Join Date
    09-21-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    39

    Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA or B

    Please can you show me how to create an IF statement based on a dynamic range that returns TRUE if it finds the value 'ticket' in ColumnB so that it it stops at the cell either above first blank cell in ColumnB or the cell above where it finds a cell in ColumnA that begins with the word "Issue". "Issue" is a prefix to a number so there will be Issue1, Issue 2, Issue3 etc which is why it needs to look for a cell in column A that begins with "issue" rather than equals "Issue".

    Thank you

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA

    Hi,

    Would you be able to post a small sample workbook with a few examples and, importantly, your desired result in each case?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    09-21-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA

    Please find example attached.

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA

    Try this array formula (important that you know how to enter this type of formula in Excel) in C1 and copy down as required:

    =IF(ISNUMBER(SEARCH("Issue",A1)),COUNTIF(B2:INDEX(B1:B$10000,MIN(MATCH(TRUE,INDEX(B2:B$10000,,)="",0),IFERROR(MATCH(TRUE,ISNUMBER(SEARCH("Issue",INDEX(A2:A$10000,,))),0),10^10))),"Ticket")>0,"")

    Regards

  5. #5
    Registered User
    Join Date
    09-21-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA

    That's great, thank you. How would I adapt this to return the word "Ticket" rather than TRUE?

    Thanks

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Dynamic range in ColumnB that starts and ends depending on a value in either ColumnA

    No worries. And what if it's FALSE? Still FALSE? Or another blank?

    This will do the former:

    =IF(ISNUMBER(SEARCH("Issue",A1)),IF(COUNTIF(B2:INDEX(B1:B$10000,MIN(MATCH(TRUE,INDEX(B2:B$10000,,)="",0),IFERROR(MATCH(TRUE,ISNUMBER(SEARCH("Issue",INDEX(A2:A$10000,,))),0),10^10))),"Ticket")>0,"Ticket"),"")

    This the latter:

    =IF(ISNUMBER(SEARCH("Issue",A1)),REPT("Ticket",COUNTIF(B2:INDEX(B1:B$10000,MIN(MATCH(TRUE,INDEX(B2:B$10000,,)="",0),IFERROR(MATCH(TRUE,ISNUMBER(SEARCH("Issue",INDEX(A2:A$10000,,))),0),10^10))),"Ticket")>0),"")

    Regards

+ 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. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  2. [SOLVED] Need to merge duplicates in ColumnA, delete entries in ColumnB but keep unique in C
    By mdhillyer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-06-2012, 03:10 AM
  3. Using a macro to tell when info starts and ends.
    By G33kman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2008, 01:50 PM
  4. Replies: 4
    Last Post: 08-04-2006, 08:55 PM
  5. Count cells that contain "Y" in columnA IF contains"X" in columnB
    By holliedavis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-20-2006, 01:15 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