0

Hey guys. So I'm currently building an app and I'm having a bit of trouble. So I have an Excel file and it reads it and opens it fine(I imported microsoft.office.interops.excel but what I want to know is how to loop through column A and pick out the rows that are equal to "USA Hawaii". And then out of those rows I want it to pick out the rows in column B that say "7". And then out of those rows I want it to pick out the row that says "58". I was going to use and If statement but I'm just having trouble because I've never used an Excel file in VB before. My If statement would go something like this

If My.Settings.Location = #read through all the rows in column A that have USA Hawaii# and now.Hour = #read through all the rows in column B that have 7# and now.Minute = #read through all the rows in column C that have 58# then
'do some stuff
end if

Can somebody help me? Thanks.

2
Contributors
2
Replies
11
Views
1 Year
Discussion Span
Last Post by Programmer592
0

Just read through column A: if ="USA Hawaii" check column B and column C.
IF OK do something, else continue reading column A.

0

How do you read through columns in code though? That's the part I don't know

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.