+ Reply to Thread
Results 1 to 6 of 6

basic question about merging two column

  1. #1
    Registered User
    Join Date
    01-18-2023
    Location
    italy
    MS-Off Ver
    2211
    Posts
    2

    basic question about merging two column

    Good morning ,

    lets say I have two usernames column and each username has a value attached to it . I want to merge these two set in one set.

    Some usernames are in both columns , in that case i want to sum the values .


    I think the based way to describe what I want to do is attaching a little example excel question.PNGexcel answer.PNG

  2. #2
    Registered User
    Join Date
    01-18-2023
    Location
    London
    MS-Off Ver
    2020
    Posts
    3

    Re: basic question about merging two column

    Array both off with sumifs.

  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,445

    Re: basic question about merging two column

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    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
    Registered User
    Join Date
    01-18-2023
    Location
    italy
    MS-Off Ver
    2211
    Posts
    2

    Re: basic question about merging two column

    sorry for my mistake, I attached an example here
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: basic question about merging two column

    1. There are trailing spaces in the names in column D.

    EITHER... leave them and use:

    =LET(A,TRIM(VSTACK(A3:B5,D3:E5)),B,UNIQUE(INDEX(A,,1)),C,BYROW(B,LAMBDA(x,SUM(IF(INDEX(A,,1)=x,--INDEX(A,,2))))),HSTACK(B,C))

    OR get rid of them (preferable.. use clean data if at all possible) and use:

    =LET(A,VSTACK(A3:B5,D3:E5),B,UNIQUE(INDEX(A,,1)),C,BYROW(B,LAMBDA(x,SUM(IF(INDEX(A,,1)=x,--INDEX(A,,2))))),HSTACK(B,C))

    Whichever way you go... adjust the bits in red to suit your real data.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: basic question about merging two column

    with Power Query
    (tailored to your example)

    Please Login or Register  to view this content.
    username Value
    jack
    97
    jill
    77
    john
    57
    ann
    10

+ 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. a basic question
    By amir0914 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2020, 06:52 AM
  2. Question about merging rows with different column items
    By dlangley2 in forum Excel General
    Replies: 3
    Last Post: 10-25-2015, 08:22 PM
  3. [SOLVED] Very Basic Question From New Guy
    By nickscofer in forum Excel General
    Replies: 4
    Last Post: 10-20-2014, 12:29 AM
  4. Replies: 1
    Last Post: 03-04-2012, 12:03 AM
  5. PRobably a basic question to do with column titles
    By efils_god in forum Excel General
    Replies: 2
    Last Post: 06-22-2011, 04:16 AM
  6. Basic question for blank column
    By Tre_cool in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2005, 04:20 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