Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
difficult to test as I got at least 3 compiler errors: - two End Ifs without an opening If - an undefined label But looking at the lines: If Data 0 Then If Data = "5.00" Then C.Offset(0, 4).Value = Round(qty * rate * Data / 100, 2) ElseIf Data = "17.50" Then C.Offset(0, 5).Value = Round((qty * rate * Data) / 100, 2) Data is defined as long but you make a string comparison with (If Data = "5.00") Also try to set a breakpoint before these lines and look at the values for each variable and check the results -- Regards Frank Kabel Frankfurt, Germany |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with simple if statement | Excel Worksheet Functions | |||
Simple IF statement | Excel Worksheet Functions | |||
Simple IF statement | Excel Worksheet Functions | |||
Simple IF statement | Excel Worksheet Functions | |||
Simple IF statement | Excel Worksheet Functions |