Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

needing some If Range value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny Mick - 23 Mar 2006 20:28 GMT
Good afternoon ,
 I'm lost . . .this bit of code is used in a 'call.'  it works fine in the
body of the program, but does not work in any of my 'calls.'  why???   I've
tried just about everything (except reboot).  Still a rookie here, but I
can't seem to figure this out.  Thanks in advance for any and all assistance.

For count = 3 To 1000
     If Range("A" & count) = "Lanham" Then
         If Range("H" & count) = "IX*" Then
              figure = figure + 1
          End If
      End If
   Next count
Johnny Mick - 23 Mar 2006 20:50 GMT
here's an example of the data the loop is 'counting' through:
  A                 H
Lanham    CK082917
Lanham    CK082780
Lanham    PT204185
Lawyer    CK082960
Lawyer    RB01MZW-060A
Lawyer    RA01MZW-060A
Lawyer    PT204673
Lawyer    R01MRIC-060P

> Good afternoon ,
>   I'm lost . . .this bit of code is used in a 'call.'  it works fine in the
[quoted text clipped - 9 lines]
>        End If
>     Next count
Johnny Mick - 23 Mar 2006 22:37 GMT
I guess my trouble post was a little too vague. . . thanks anyway. . .I
figured it out.  For some reason, I wasn't able to use '=' when comparing a
value with a wildcard. . .I ended up using 'Like' and it is working fine.

> Good afternoon ,
>   I'm lost . . .this bit of code is used in a 'call.'  it works fine in the
[quoted text clipped - 9 lines]
>        End If
>     Next count
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.