I am running several models and only wanted to export selected regression coefficients to excel. I created a macro for the selected regression coefficients that I wanted to export.

I am trying to use this macro in the keep option in esttab

Code:
global m1did "1.treat#1.post"

esttab y1 y2 y3 using table2.csv, b(3) se(3) title(Regression coefficients on DID model) star(# 0.1 * 0.05 ** 0.01 *** 0.001) replace bracket keep(`m1did')
However the excel exported contained all the regression coefficients, not just the coefficients on 1.treat#1.post

I tried to change to keep(`"1m1did'"') it gave me empty cells

What am I doing wrong in using the macro variable for the keep option?

Thanks!

Rui