Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've written the following code, with comments, to work in a workbook for
calculating values for scientific pipettors. However, when I run the code, I get an error that says type mismatch. Am I missing something? Do I need to declare the H5 cell specifically as a double or something? Help! Sub PipettorValueFillIn() 'Based on the value typed into cell H5 on the sheet Pipettor_Calibration_Worksheet, 'this module will look up and return the volume, percent and CV for the input value. 'Volume, percent and CV are in the sheet named errors in cells b9 to d11 if the vallue is 0.2, for example. 'The volume, percent and CV should be placed in the sheet named Pipettor in cells J9 to L11. If [pipettor_calibration_worksheet.h5] = 0.2 Then [pipettor.j9:l11] = [errors.b9:d11] End If If [pipettor_calibration_worksheet.h5] = 0.5 Then [pipettor.j9:l11] = [errors.b13:d15] End If If [pipettor_calibration_worksheet.h5] = 1 Then [pipettor.j9:l11] = [errors.b17:d19] End If If [pipettor_calibration_worksheet.h5] = 2 Then [pipettor.j9:l11] = [errors.b21:d23] End If If [pipettor_calibration_worksheet.h5] = 10 Then [pipettor.j9:l11] = [errors.b25:d27] End If If [pipettor_calibration_worksheet.h5] = 20 Then [pipettor.j9:l11] = [errors.b29:d31] End If If [pipettor_calibration_worksheet.h5] = 100 Then [pipettor.j9:l11] = [errors.b33:d35] End If If [pipettor_calibration_worksheet.h5] = 500 Then [pipettor.j9:l11] = [errors.b37:d39] End If If [pipettor_calibration_worksheet.h5] = 1000 Then [pipettor.j9:l11] = [errors.b41:d43] End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
How to get variables from worksheet code to userform code | Excel Programming | |||
how to prevent code running when in a worksheet code | Excel Programming | |||
Code Conflicts With Worksheet Change Code | Excel Programming | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming |