SOLVED

Mail merge record number

Copper Contributor

I have created a spreadsheet to enter and track data. I'm using sheet1 to enter various data. In sheet2 I'm using a FILTER function to create a list based on values in column L in sheet1. The data in the list in sheet2 is used to create a mail merge in word. my question is, is there a way to have excel automatically count / assign numbers to entries so that I can know what would be the record number for this entry in Word?

3 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@Ahmed_Ezzedin 

You could use SEQUENCE and do some stacking:

=LET(
    filtered, FILTER(B2:C8, C2:C8 = "a"),
    r, ROWS(filtered),
    auto_num, SEQUENCE(r),
    HSTACK(auto_num, filtered)
)

Patrick2788_0-1695760346910.png

 

 

Thank you very very much!
You're welcome!
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Ahmed_Ezzedin 

You could use SEQUENCE and do some stacking:

=LET(
    filtered, FILTER(B2:C8, C2:C8 = "a"),
    r, ROWS(filtered),
    auto_num, SEQUENCE(r),
    HSTACK(auto_num, filtered)
)

Patrick2788_0-1695760346910.png

 

 

View solution in original post