with your help I "simplified" to the following code. In
theory, this will allow the data to be transferred to the correct row
depending on which page I want to transfer my data to.
The code works fine when iGroupNum doesn't have a "01" or "02
appendage. But it's erroring when it gets to (Left(iGroupNum,
Len(iGroupNum) - 2))
Am I using the correct nomenclature here?
---------------------
If Right(iGroupNum, 2) = "01" Then
If TissueData Then
iGroupNum = ((Left(iGroupNum, Len(iGroupNum) - 2)) - 1) * 6 + 10
Else
iGroupNum = (Left(iGroupNum, Len(iGroupNum) - 2)) * 2 + 8
End If
ElseIf Right(iGroupNum, 2) = "02" Then
If TissueData Then
iGroupNum = ((Left(iGroupNum, Len(iGroupNum) - 2)) - 1) * 6 + 13
Else
iGroupNum = (Left(iGroupNum, Len(iGroupNum) - 2)) * 2 + 9
End If
Else
If TissueData Then
iGroupNum = ((iGroupNum - 1) * 6) + 10 'account for new group
every 3 rows
Else
iGroupNum = iGroupNum * 2 + 8 'new group each row
starting at row 5
End If
End If