Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: exporting formulas from stata to excel

From   Eric Stradley <>
Subject   st: exporting formulas from stata to excel
Date   Tue, 14 Feb 2012 18:58:19 -0500


I have used stata12 to create string variables that contain excel-type formulas. Ideally, I would like to export a stata .dta file into excel that evaluates the formulas.

For instance, I have a variable AZ that corresponds to column AZ in my excel notebook and contains something like


I've exported the data as text with a unique delimiter, like ";", but then I still have to text-to-column in each spreadsheet which surprisingly seems to run up against some variable width issues in excel (I have some much longer formulas). Additionally, the point of the exercise is to cleverly fill down the formulas according to _n in stata and avoid having to fill down in excel, which can get tedious across many notebooks and rows. That said, I thought I would take advantage of stata12's export excel command, and when I do so I get something of the form:


which seems to be exactly what I want. However, the excel notebook refuses to execute the formula unless I click into each individual cell, which again is tedious and ruins the point of the exercise.

Sorry that this is more of an excel question than a Stata question, but I am curious to know if anyone has tried this before and/or has any suggestions. Thanks alot.


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index