Forum Discussion

Ahmed_Ezzedin's avatar
Ahmed_Ezzedin
Copper Contributor
Sep 26, 2023
Solved

Mail merge record number

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?

  • 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's avatar
    Patrick2788
    Silver Contributor

    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)
    )

     

     

Resources