Problem with VBA code

Closed
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello

Lets say I want the value of the cell defined by row "Banana" and column "Old".
You can abviously tell it is the value "40", but how do I write that in VBA code?

.......... Fresh Old
Apple.. 10 20
Banana 20 40
Lemon. 30 60


Any help plz ?

Ruben
Norway



1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
769
locate row for banana ( say it is lRow)
locate column for old ( say it is iCol)

then

Cells(lRow, iCol) gives you 40