+ Reply to Thread
Results 1 to 5 of 5

Merge Two Columns

  1. #1
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Merge Two Columns

    I need to merge two columns with an "if else" formula.

    Column A always has a value but Column B has a value sometimes. I need Column C to produce Column B value unless its null then produce column A value if null. Column B is from table 2 and Column A would be from a Query1.

    My new column is "QuantityOrdered"

    QuantityOrdered: if(([Table2_ColumnB]=null), then([Query1_ColumnA]), else([Table2_ColumnB])))

    I think I just made a mess of the formula.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Merge Two Columns

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    09-08-2015
    Location
    usa
    MS-Off Ver
    2010
    Posts
    73

    Re: Merge Two Columns

    I thought the description was easier than try to post copies of the database. So in the example I need the value in Column O (sheet 3) to be used unless it is null then use Column R on sheet 2 in a new column on the query result I run from sheet 3.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Merge Two Columns

    =IF(O2="",Sheet2!R2,O2)

  5. #5
    Registered User
    Join Date
    04-27-2021
    Location
    USA
    MS-Off Ver
    16.0
    Posts
    2

    Re: Merge Two Columns

    Thanks, that helped!

+ 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: 4
    Last Post: 03-03-2019, 02:24 PM
  2. [SOLVED] tricky text formula from several columns and merge in one columns
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2017, 10:54 AM
  3. [SOLVED] Merge duplicate rows and merge the columns (approx 10 columns)
    By adfeddon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2012, 11:19 AM
  4. [SOLVED] Merge columns if certain number of columns in row
    By FreeThrow in forum Excel General
    Replies: 9
    Last Post: 06-22-2012, 03:04 PM
  5. merge 2 columns
    By syn in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-18-2008, 09:29 AM
  6. merge text from 2 columns into 1 then delete the old 2 columns
    By sleepindogg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-30-2006, 02:30 PM
  7. Need to merge columns
    By Jay T in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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