Cell values from excel with two condition

t.slosar
Participant Participant
223 Views
2 Replies
Message 1 of 3

Cell values from excel with two condition

t.slosar
Participant
Participant

Hello, 

can someone help me with rule what cell values from exel? 

I have table in excel lets say: 

       A    B     C  ....

1  "m"  "1"   "x"...

2  "m"  "2"  "t"....

3  "y"   "1"  "t"....

4  "y"   "2"  "x"....

 

I want to find row number where: A="m" and B="2"

I find out how to get row number where just A="m". 

 

aRow = GoExcel.CellValues(Worksheet, Sheetno, "E2", RowEnd)
For Each Row As String In aRow
	x = Row
	If x = main_diameter Then
		 MessageBox.Show(x)

		End If 
		
	Next

Thank you. 

 

0 Likes
Accepted solutions (1)
224 Views
2 Replies
Replies (2)
Message 2 of 3

dalton98
Collaborator
Collaborator
Accepted solution

daltonparrish_0-1649247278861.png

 

0 Likes
Message 3 of 3

t.slosar
Participant
Participant

Thank you, so simple.. 🙂

 

0 Likes