LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Simple code error statement

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with simple if statement Lou H[_2_] Excel Worksheet Functions 3 November 7th 08 05:40 PM
Simple IF statement Connie Martin Excel Worksheet Functions 0 November 30th 06 06:09 PM
Simple IF statement Alok Excel Worksheet Functions 0 November 30th 06 05:51 PM
Simple IF statement Dave F Excel Worksheet Functions 0 November 30th 06 05:49 PM
Simple IF statement Connie Martin Excel Worksheet Functions 0 November 30th 06 05:42 PM


All times are GMT +1. The time now is 10:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"