Link to home
Start Free TrialLog in
Avatar of RWayneH
RWayneHFlag for United States of America

asked on

Getting a value from an array?

I have a value stored in a name called CH_FinGrp, in this case it is: X1, however X1 will refer to a value in a table on a sheet named: FinGrpFinUsedTable
How do I look down column A of the FinGrpFinUsedTable sheet to find the CH_FinGrp value, then grab the value in the cell to the right (offset one column right)
Then give that a name to use, like ActualFinishToUse = the result found?

So in my example, if X1 is the value of CH_FinGrp, it should return TR_E and assign that the name ActualFinishToUse
FinGrpFinishUsedTable.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

Can this be made more dynamic?  Perhaps if I name the range ("A1::C18") to "FinGrpTable"  How would this change the way this looks?
Avatar of RWayneH

ASKER

ActualFinishToUse = WorksheetFunction.VLookup(CH_FinGrp, Range("A1:C18"), 2, 0)

is failing.  "unable to get vlookup property of the WorkSheetFunction class
Avatar of RWayneH

ASKER

Ok got this to work... now.  How do I remove absolute locations and use a name?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

Thanks for the help.