[AccessD] (OT) Excel Question

Erwin Craps - IT Helps Erwin.Craps at ithelps.be
Wed Aug 11 02:15:39 CDT 2004


Using CELLS (row, column)
With celLs you can approach a cell in a numeric way.
Every function that use a alfanum style like "B7" can be replaced with
cells(2,7)

Use this for 1 cell ( replace 1 and 1 by a variable)
objSheet.Cells(1, 1) = "TEST"
   
Use this for approaching a range (replace 2,2 and 2,3 by variables)
objSheet.Range(objSheet.Cells(2, 2), objSheet.Cells(2, 3)) = "jkjlkjl"
    

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Oleg_123 at xuppa.com
Sent: Wednesday, August 11, 2004 4:43 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] (OT) Excel Question

Hello Group
Does anyone know how I can loop across columns from column C till the
last one ? I only know how to loop though numerics

Oleg


Sub Numbers()
Dim a As Integer
Dim b As Integer
Dim c

a = 7

Do While IsEmpty(Range("A" & a)) = False b = 0

If Range("C" & a) <> 0 Then b = b + 1
If Range("D" & a) <> 0 Then b = b + 1
If Range("E" & a) <> 0 Then b = b + 1
If Range("F" & a) <> 0 Then b = b + 1
If Range("G" & a) <> 0 Then b = b + 1
If Range("H" & a) <> 0 Then b = b + 1
If Range("I" & a) <> 0 Then b = b + 1
If Range("J" & a) <> 0 Then b = b + 1
If Range("K" & a) <> 0 Then b = b + 1
If Range("L" & a) <> 0 Then b = b + 1
If Range("M" & a) <> 0 Then b = b + 1
If Range("N" & a) <> 0 Then b = b + 1
If Range("O" & a) <> 0 Then b = b + 1

If b >= 2 Then Range("A" & a).Font.ColorIndex = 3 a = a + 1

Loop

End Sub


-----------------------------------------
Make Money and Find Love at Finally.com
http://www.finally.com/?link=webmail


--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list