how to decipher an Excel macro function?


Posted by becky on January 18, 2002 2:46 PM

Hi,
New to this place, but desperate!
We have been given an Excel macro function (in Excel spread sheet) to categorize people into certain lifestyles. We need to integrate this into a survey we need to send out. My question is how we can decipher this into an algorithm that we can use with our survey programming software? Or how can we take the whole Excel function into the survey by referring to it, or by inputting data in it automatically?

Has anyone here had any experience with this kind of thing? Would greatly appreciate any thoughts!!!!!!!

Posted by Joe Was on January 18, 2002 3:22 PM


We do it all the time.

You need to tell us what software you want to link to (you may or may not be able to).
What type of data needs to be transferred. If your Excel application is made up of only sheet functions or if you also have VBA and or VB code as well as any macros. If you have VB macros what are they doing. What does your data look like?
Can your software take a flat file (comma delineated data) or must it be in a certain format.

Note: what your survey software is doing can be done in Excel and then you would not need to export data! JSW

Posted by becky on January 18, 2002 3:34 PM

First of all, thank you for your reply!

The Excel macro/function we got has three spread sheets in it in total, one is for data input, the second one is the calculation function, and the third is the output with all cases classified into different segments. I have no idea if VB is being used or not. We use HTML and perl to structure our survey and link it to oracle database. There is no actual scripting of the survey. I am afraid this is not sufficient for your to give me more advice, but could you try? In what way can we use only the calculation part, and take it as a function or something to combine with our existing survey structure?

Thank you so much!

Posted by Joe Was on January 19, 2002 12:03 AM

Terminology!

Excel is the application.
What you build with Excel is the Application Project.
A sheet is a Work Area, hence WorkSheet.
A macro is a recorded set of key-strokes.
A function is a built-in tool for working with information in a cell(s) of a worksheet.
When you have more than one worksheet, with one or more of the sheets referring to information on other sheets. Then, you have a 3D application project. If your application project has one or more sheets and can stand alone as an application project, then it is a Workbook.
A User Form is an over-lay of a worksheet that acts as a Frame on which actions not directly involving cells on the worksheet, can interact with information that may or may not affect worksheet cells.
VB is Visual Basic, a programming language which can extend the operation of Excel beyond the standard package ability.
VBA is Visual Basic for Applications. In Excel VBA has extensions to VB to work with the unique aspects of Excel. Macro like blocks of code are written by the user, to build custom abilities into Excel.

There is more, but these are the bigges. All or some of the above is used to record, manipulate and analyze data. The project can include a simple spreadsheet, used to list data and do mathematical processes with it. Or, a project could include multiple worksheets, organizing different types of data, provide statistical information about the data. Then, output that information in a report form for viewing and printing. The more advanced workbooks can link to other workbooks, import and export data to other applications, publish to the web and incorporate custom user interfaces to tie it all together.

Open your Excel project, mouse click on a cell that contains information you are interested in, then write down any formulas that appear in the function bar at the top of the screen. This tells you what the spreadsheet is doing at that cell location. As there are other ways to manipulate cell data other than in the cell directly, you sheet may or may not hold all the answers to your questions, but it will be a start. Once you get your terminology correct [you mixed ideas in both your notes to the point of total contradiction] and have a handle on what your project is doing and what you want from it, write back. As without more information from you, with "explicit" real examples, there is little we can do. JSW



Posted by becky on January 21, 2002 12:25 PM

Thank you very much for all the clarification!! I think we are getting our problem under control. But really appreciate all the thoughts!