Forum Discussion
Nextif Function and Mail Merge
Hi Fabio,
Not sure if {NEXTIF} field helps for the grouping, but that's more question to Word people. From poor Excel point of view you may transform your source table and make grouping here, for example with Power Query
Simple sample file is attached
- SergeiBaklanApr 01, 2021Diamond Contributor
Sorry, not sure I understood. Perhaps you may provide small sample file with manually added desired result.
- chrispughcmcssApr 01, 2021Copper Contributor
SergeiBaklan Yes, in the examples you provided to the question. You shared the idea for using Power Query in Excel instead of NextIF in Word. The first image shows multiple rows for each person in the Name column with different information for Date and Amount. In the 2nd image shown after applying Power Query to the sheet, it shows 1 row per Name with multiple lines within each row for Date and Amount.
I found several great videos on merging and grouping data to the same row when they had a common name/data to group them by, but they all just extended into one long line. Your example does not appear to use text wrap to fix this as there seems to be plenty of space in the Date column to have the 2nd date in the same line as the 1st date. What did you do to get the 2nd line within the row?
Thanks for replying back so quickly. I appreciate your help.
- SergeiBaklanApr 01, 2021Diamond Contributor
I'm not sure how you are familiar with Power Query. Here we query the source, Group By names, aggregate other columns using concatenation of values for each name with line break in between, return result into Excel sheet. To make line breaks visible we shall apply Wrap text in formatting of these cells.