Share via

EXCEL SUM TEXT

Anonymous
2018-03-08T05:12:43+00:00
A B C D
1 100 1 =SUMIF(A:A,C1,B:B)
2 10
1 25

I GOT RESULT 125 IN 'D1' CELL

A B C D
1 ABCD 1
2 KLMN
1 EF

LIKE ABOVE I WANT RESULT 'ABCDEF' IN 'D1' CELL WHICH EQUATION FOR IT?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2018-03-08T06:05:58+00:00

    Created UDF Function 

    Step 1: Press ALT + F11 and paste the below code and save as excel macro workbook.

    Public Function concateif(a As Range, b As String, c As Range)

        For Each cell In a

          If cell = b Then

            f = f & c.Cells(cell.Row)

          End If

        Next

        concateif = f

    End Function

    Step 2:

    In Cell D1, add the below formula

    =concateif(A1:A3,C1,B1:B3)

    it will return the result as expected.

    Was this answer helpful?

    0 comments No comments