View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Excel and VB.NET Help!!!

Mivey

You would use a range object variable and iterate through the column to test
the value. In VBA this would be

Sub IterateColumn()
Dim myCell as Range
For Each myCell in Range("A1:A100")
'Do test here
Next MyCell
End Sub

Of course you could also assign the cells used to a variable and loop this
number of times using either cells or range objects

Range("A" & myVariable).Value
Cells(myVariable,1).Value

If you need more help getting it to VB.Net post back. I'm just starting out
with it, but we may be able to help


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"mivey" wrote in message
...
Hello,

If I am in the wrong place, I apologize and please let me know.

I need a sample if anyone can provide it or a link for how I can
programmatically access row by row; 1 column of data in Excel.

I have created a program that exports data from a database into an Excel
spreadsheet and now I'd like to query a specified column in the sheet and
read the values contained in the underlying rows to see if a certain
condition is met.

Though guidance in VB.NET would be desirable, I will accept any VB or VBA
examples because I can convert the logic.

Any help would be appreciated!

Thanks,

mivey4