Hi
I new to this forum as well as to VBA programming in general.
I'm studying sociology, and working with GDA (geometric data analysis) I often have to do some standard calculation in the result-sheet (Excel) produced by the data mining program (SPAD).
I'm quite experienced in using the regular excel functions, but in trying to make a standard sheet pre-figured to do the calculation some troubles occur which I can't get my head around using regular excel functions.
That's why I think I now have to take it a step further learning to do macros and VBA stuff.
Here's what I need to do (it must be possible??? some how)
In the calculation I need know the number of variables (questions) in my analysis, that does not contain passive modalities. And no, the program doesn't give me that information by it self. I can easily count it manually every time, but yeah...
The first sheet in the result-excel-file contains the frequency-tables of the variables/questions, and the set-up of this page varies from time to time due to different number of questions, and the number of modalities in each question.
But in column D I'll always find a cell with the text-value "Count after cleaning" in the first row of a question.. Continuing down column D the absolute frequency of the modalities to the question occurs. When a modality is passive (and that's what I want to count) the cell (text)-value will be "Illustrative". If each question could have one and only one illustrative modality it would be an easy task - but that's not the case..
I therefore need a macro telling me how many times 1 or more text-values="illustrative" occur between two cells containing the value "Count after cleaning" in column D.
Example:
D
1..... Count after cleaning
2..... 2
3..... 4
4..... Illustrative
5..... Illustrative
6..... 3
7..... [Empty]
8..... Count after cleaning
9..... 9
10... Illustrative
11... 4
12... [Empty]
13... Count after cleaning
14... 2
15... 1
16... 6
17... [Empty]
and so on..... The number of questions and modalities to each question varying, making the range "float" from time to time.
Running the macro on this sheet should tell me either:
1) You have 3 Questions/Variables of which 2 contains passive modalities, or
2) You have 3 Questions/Variables of which 1 contaions only active modalities, i.e. no passive modalities.
Is that possible??
Jacob
Bookmarks