officemanager2
Technical User
Hello: I’m trying to develop a spreadsheet application that will allow for a quick classification of a lot of data. In essence what I’m looking for is the ability for the program to look at three columns and decide whether a mineral is present of absent (based on the numbers below) in a given interval, and then based on what chemicals are present or absent that interval is classified as a specific type.
K >=3 Present
K <3 Not Present
Na >=2 Present
Na <2 Not Present
C >=5 Present
C <5 Not Present
This would lead to seven potential outcomes or as I was saying before types:
K Na C Type 1
K Na Type 2
K C Type 3
K Type 4
Na C Type 5
Na Type 6
C Type 7
I would like to set this up as VB code because this is the beginning and if things go well there will be 11 variables, as well I would like to find a way to flag or signal when certain variables far exceed the score. An example would be if the K exceed a score of 20.
Going by VB I'm thinking the declarations would be something like:
And so on for the rest
Which would be followed by
And so on for the rest
I have over simplified this code but it seemed to me the best starting point. I did not want to write out too much in case I am way off base on how to set this up.
thanks
K >=3 Present
K <3 Not Present
Na >=2 Present
Na <2 Not Present
C >=5 Present
C <5 Not Present
This would lead to seven potential outcomes or as I was saying before types:
K Na C Type 1
K Na Type 2
K C Type 3
K Type 4
Na C Type 5
Na Type 6
C Type 7
I would like to set this up as VB code because this is the beginning and if things go well there will be 11 variables, as well I would like to find a way to flag or signal when certain variables far exceed the score. An example would be if the K exceed a score of 20.
Going by VB I'm thinking the declarations would be something like:
Code:
Dim K as Integer ( or should this be Boolean)
Dim Na as Integer ( or should this be Boolean)
Dim C as Integer ( or should this be Boolean)
Dim Type1 as String
Dim Type2 as String
Dim Type3 as String
Dim Type4 as String
Dim Type5 as String
Dim Type6 as String
Dim Type7 as String
If K >=3 ThenPresent
Else If K<3 Not Present
And so on for the rest
Which would be followed by
Code:
If K Present, Na Present, Ca present Then Type 1
Else If K present, Na Present, Ca No Present Then Type 2
I have over simplified this code but it seemed to me the best starting point. I did not want to write out too much in case I am way off base on how to set this up.
thanks