Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You'll have to separate your two tests:
Case "S" If IngPenRow0 then James On May 23, 1:34?pm, Dave Birley wrote: The trouble with having programmed for a long time in one language is that your thought system for design constantly works along the same routes. Here is a simple Case statement... If dblSubTotal 0 Then Select Case strSalaryOrHour Case "S" And lngPenRow 0 Set rngWorkCell = Cells(lngPenRow, 20) Case "S" And lngPenRow = 0 lngPenRow = 1 Set rngWorkCell = Cells(lngPenRow, 20) Case "H" And lngPn2Row 0 Set rngWorkCell = Cells(lngPn2Row, 21) Case "H" And lngPn2Row = 0 lngPn2Row = 1 Set rngWorkCell = Cells(lngPn2Row, 21) End Select rngWorkCell.Select rngWorkCell.Value = dblSubTotal End If Where everything is Dimmed, and lngPenRow (or lngPn2Row) will have received a value in the If construct immediately preceding this. Unfortunately each Case is based on a compound test, where one part is Character and one part is Numeric, and (I hate to confess this in public) I did read the Help file on Case, so I know why that dog don't hunt. So how must I re-structure this to get to where I'm trying to go (rngWorkCell.Value = dblSubTotal)? -- Dave Temping with Staffmark in Rock Hill, SC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lower case letter "i" always converts to upper case | Excel Discussion (Misc queries) | |||
Converting "uppercase" string data to "lower case" in CSV file | Excel Discussion (Misc queries) | |||
"Case" Problem | Excel Programming | |||
how do I count only lower case "x" and exclude upper case "X" | Excel Worksheet Functions |