ChemStation Report-Calculation Macro

Hi,

I have a method where I  occasionally run two different preparations of each test sample and I would like to have table in the report that would automatically do a calculation to compare these based on the text in the name. For example, if the sample set contains SampleName-2024 and SampleName2024-B, it will then execute a calculation to do (SampleName2024-B(area) - SampleName-2024(area)/ CalCurve_slope) or similar. I have been able to do this in MS Excel but so far I have not been able to create a macro to do this in the Intelligent Report. Is it possible to do this in ChemStation?

Thanks 

  • Hello,

    What version of Chemstation are you using? You mention both macros and IR, I can help you do something like this in IR but not Chemstation macros. Below is an example in IR where I used part of the sample name to determine a string output in a column. The same logic could be used but the true false values replaced with your calculations. If you have even more terms a switch statement can be use in place of nested if statements. 

     =Switch(Choose(2,Split(Sample_Name,"_")) = "B", "B Calc", Choose(2,Split(Sample_Name,"_")) = "C", "C Calc", Choose(2,Split(Sample_Name,"_")) = "", "A Calc"

    Marty

  • Thank you! That looks very helpful, I'll give it a try later and let you know if it works. 

    I'm using Chemstation Rev C.01.10 [287]

    OL IR- 5.0.0.352

    CS 35900 A/D Driver- 2.3.54

    CS LC and CE Drivers- 3.2.23

Was this helpful?