+ Reply to Thread
Results 1 to 3 of 3

Concatenate Multiple Rows And Switch Columns If Blank

  1. #1
    Registered User
    Join Date
    05-28-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2007
    Posts
    86

    Concatenate Multiple Rows And Switch Columns If Blank

    I am using the following VBA to concatenate multiple results of Index Match formulas:


    Please Login or Register  to view this content.

    With the following formula:
    =Lookup_concat(E2,Sheet2!$D$2:$D$2000,Sheet2!$N$2:$N$2000)

    This is working well, however sometimes the N column in sheet2 contains a blank cell. In this scenario I want to return the value in the M column.


    Please see attached xlsm.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Concatenate Multiple Rows And Switch Columns If Blank

    Like so, adding another parameter to your function:
    Please Login or Register  to view this content.

    With the following formula:
    =Lookup_concat(E2,Sheet2!$D$2:$D$2000,Sheet2!$N$2:$N$2000,Sheet2!$M$2:$M$2000)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-28-2009
    Location
    Oxford
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Concatenate Multiple Rows And Switch Columns If Blank

    Amazing, thank you.

+ 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. Concatenate multiple rows and columns into 1 cell
    By mj44 in forum Excel General
    Replies: 19
    Last Post: 08-29-2013, 02:37 PM
  2. Replies: 14
    Last Post: 08-01-2013, 08:48 AM
  3. Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)
    By jasw529 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2013, 06:45 AM
  4. How do I switch Rows to Columns?
    By rdubya in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-16-2007, 07:23 PM
  5. Switch Rows and Columns
    By Bonnie in forum Excel General
    Replies: 3
    Last Post: 03-03-2005, 12:06 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