Formula working in 2019 not in 2007

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello experts,
I have this Eric W's formula which is working in excel 2019 but showing an error in 2007. Can someone please tell me what can be the solution.?
Book1.xlsx
ABCDEF
117/08/2021aaz/116820829672/a2V/yzavz#NAME?
2zzzyz555@ayazz/yzyazazzz 
317/08/2021aaz/116820329131/a2V/azzyz#NAME?
4aw16889- 
51@ayzxza/azzyzaW 
617/08/2021yzza_zy:yyzyz2116881584#NAME?
73/0031/ yzazaz zyazazaa 
816/08/2021yzza_aaa:aayzz21167213#NAME?
9021/azyzy 
10zyyavzazaya/yyzy0001435/04 
1113090674 
1216/08/2021zyaa-#NAME?
13zy/116713428622/924626717 
141/yzazzazy 
15
16Solved by Eric W
17
18insert column next to description
19select description column and align text to left
20remove extra spaces by replace 2 spaces with 1 space
21Enter formula in Narration Heading row cell E1
22=IF(C1="","",_xlfn.CONCAT(D1:INDEX(D:D,IFERROR(AGGREGATE(15,6,ROW(C1:C9)/(C2:C10<>""),1),ROW()+10))))
23range not required to change
Concat rows at each date
Cell Formulas
RangeFormula
E1:E14E1=IF(C1="","",_xlfn.CONCAT(D1:INDEX(D:D,IFERROR(_xlfn.AGGREGATE(15,6,ROW(C1:C9)/(C2:C10<>""),1),ROW()+10))))
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
The reason it doesn't work in Excel 2007 is because CONCAT was added in 2019. Without CONCAT, you can try the formulas Jasonb75 provided in the original thread, which requires a helper column, or it will require VBA.
 
Upvote 0
The reason it doesn't work in Excel 2007 is because CONCAT was added in 2019. Without CONCAT, you can try the formulas Jasonb75 provided in the original thread, which requires a helper column, or it will require VBA.
Thanks Eric W. I did just that to complete my work today. Thanks to Jasonb75 for sharing that formula. It came to my rescue and saved a lot of time. Ain't there any other way to get the result with a single formula which will work in any version of excel.?
 
Upvote 0
Microsoft is adding new functionality to Excel all the time. The last few years have had a lot of new functions added. Sometimes the new functions are just to provide an easier way to do things, but there is a more complicated way using older functions. Sometimes the new functions do things that weren't possible at all. CONCAT is one of those. So I don't believe there's any single-cell way to do that formula in 2007.
 
Upvote 0
Microsoft is adding new functionality to Excel all the time. The last few years have had a lot of new functions added. Sometimes the new functions are just to provide an easier way to do things, but there is a more complicated way using older functions. Sometimes the new functions do things that weren't possible at all. CONCAT is one of those. So I don't believe there's any single-cell way to do that formula in 2007.
Okies. May as well try VBA then.
 
Upvote 0
I am sharing a sample data to join the text in text column at each change in date with the help of a code. At times the data ranges to more than 4000 rows. After not able to get the formula work in 2007 version of excel and as suggested by Eric W, I have to go for a VBA code as I don't have any other option.
My very first query was solved by Rick Rothstein by VBA code for a somewhat similar query.
Rich (BB code):
Sub ConcatToBlankBelow()
'solved by Rick Rothstein 
 Dim Ar As Range
  For Each Ar In Columns("A").SpecialCells(xlConstants).Areas
    If Ar.Count = 1 Then
      Ar(2).Value = Ar.Value
    Else
      Ar(Ar.Count + 1).Value = Join(Application.Transpose(Ar.Value), ", ")
    End If
  Next
End Sub
But I am not able to edit the same. I need your expertise to get the expected result as shown in the image below.
Join text at each change in date.xlsm
ABCDE
1DateTextExpected Result
201-06-2022WORKWORK IS WORSHIP
3IS
4WORSHIP
501-06-2022NOTHINGNOTHING IS IMPOSSIBLE
6IS
7IMPOSSIBLE
802-06-2022HELLOHELLO
902-06-2022HAVEHAVE A NICE DAY
10A
11NICE
12DAY
1302-06-2022GOODGOOD MORNING
14MORNING
1503-06-2022IMPOSSIBLEIMPOSSIBLE IS FOR THE UNWILLING
16IS
17FOR
18THE
19UNWILLING
2004-06-2022TRYTRY AGAIN
21AGAIN
Join text
 
Upvote 0
Try this:

VBA Code:
Sub ConcatTest()
'
    Dim ArrayRow        As Long, OutputRow          As Long
    Dim BlankRows       As Long, CurrentRow         As Long
    Dim InputArray      As Variant, OutputArray()   As Variant
'
    InputArray = Range("C2:D" & Range("D" & Rows.Count).End(xlUp).Row).Value2       ' Save data from sheet into InputArray
    ReDim OutputArray(1 To UBound(InputArray, 1), 1 To 1)                           ' Set OutputArray to same # of rows as the InputArray
'
    BlankRows = 0                                                                   ' Initialize BlankRows
    OutputRow = 0                                                                   ' Initialize OutputRow
'
    For ArrayRow = 1 To UBound(InputArray, 1)                                       ' Loop through the rows of the InputArray
        If InputArray(ArrayRow, 1) <> vbNullString Then                             '   If Date is not blank then ...
            OutputRow = OutputRow + 1                                               '       Increment OutputRow
'
            CurrentRow = OutputRow + BlankRows                                      '       Get total of OutputRow + BlankRows and save to CurrentRow
            OutputArray(CurrentRow, 1) = InputArray(ArrayRow, 2)                    '       Save Concat word to OutputArray(CurrentRow, 1)
        Else                                                                        '   Else ...
            BlankRows = BlankRows + 1                                               '       Increment BlankRows
            OutputArray(CurrentRow, 1) = OutputArray(CurrentRow, 1) & _
                    " " & InputArray(ArrayRow, 2)                                   '       Append a space & next Concat word to OutputArray(CurrentRow, 1)
        End If
    Next                                                                            ' Loop back
'
    Range("E2:E" & Range("D" & Rows.Count).End(xlUp).Row).Value2 = OutputArray      ' Display Concat word list to sheet
End Sub
 
Upvote 0
Solution
JohnnyL. It is perfect. It is working in 2019. Will the same code work in 2007 also.?
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top