Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am struggling to get Vlookup and Hlookup to work in my Office 2007 application. For example the following does not generate an error, but also does not identify when the value in column 10 is "Opportunity". The data is sorted in ascending order as per the Vlookup requirement. Dim sRiskNum As String ' risk number being costed Dim sOppThreat As String ' used to define an Opportuinity or Threat If Application.VLookup(sRiskNum, Sheets("identification").Range("a6:j500"), 10) = "Opportunity" Then sOppThreat = "Opportunity" Else sOppThreat = "Threat" End If Currently I am using a workaround of creating a Range variable offsetting this through the list of sRiskNum within a Do...While loop and then returning the appropriate value via another offset. Obviously, this is a more complicated solution than using Vlookup. I am having a similar problem elsewhere using Hlookup. Can anyone tell me what is wrong with the way I have constructed the above If statement and let me know how to get it working? Many thanks in advance Dave |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lookup help. lookup result based on data in 2 columns | Excel Worksheet Functions | |||
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU | Excel Discussion (Misc queries) | |||
Matrix lookup/mulitple criteria lookup | Excel Discussion (Misc queries) | |||
Get Cell Address From Lookup (Alternative to Lookup) | Excel Worksheet Functions | |||
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup | Excel Worksheet Functions |