excel vba - copy formula and generate new sheets -
If I have a column named 'value' with only 1 column, such as:
< Code> Column A --------- emp_id emp_name dept_idand then a 2 sheet called 'SQL', in which cells with 2 columns like:
Columns A -------- = "Select the number (*) from Texle where" & amp; A1 and "null;" = "Select Count (*) based on the table where the length (" & amp; A1 & amp; ">> gt; 10;" Column B. -------- Sheet for blank sheet for length
What is the VBA macro code (note I need it in VBA because I have to generate sheets Button) Would I need to generate the following two output sheets (each sheet with only one column):
Sheet for blank -------- ---------- - Select the number (*) from the table x where emp_id is zero; Select the number (*) from the table (x) where emp_name is zero; Select the number (*) from the table (x) where dept_id is zero; Sheet for length ------------------- Select the table count (*) where the length (emp_id) is gt; 10; Table (where) length (emp_name) & gt; Count (*) from 10; Select Count (*) from the table () where the length (dept_id) & gt; 10;
I think this will do what you are asking.
The change I made is that on the "SQL" sheet, I have changed the contents of the cell to look like this:
= "Selection of the table Do not count (*) from where the variable is redundant; "
Then I used " Variable " instead of " & amp; A1 & amp; ," and then in the code Emp_id, emp_name, etc. replaces this word with the correct value.
Comments
Post a Comment