Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7488077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:43:52+00:00 2026-05-29T14:43:52+00:00

i have the following code: It is supposed to go into a sheet named

  • 0

i have the following code:

  • It is supposed to go into a sheet named “Flash” and get the i-th 2 digit numeric value and retrieve the value in a column offset 4 to the right of the Activecell.
  • Then swap to a sheet named “Sheet1” on the same workbook and use a Vertical Lookup function to find the retrieved value and return the value 4 columns to the right of that cell.

However when i run the script below it stops working at :

MsgBox (ActiveSheet.VLookup(LookFor, "A:A", 4, True))

and VBA throws error 438 object doesn't support this property or method

does anyone know why there’s an exception?

' Begin lookup :
Dim i As Integer, designator As String, LookFor As String
Flash.Activate
ActiveSheet.Range("C3").Select
For i = 3 To lastUsedCellInRow("C")
    designator = "C" + CStr(i)
    Dim cellVal As String
    cellVal = ActiveSheet.Range(designator).Value()
    If (Len(cellVal) <= 2 And IsNumeric(cellVal)) Then
        LookFor = ActiveSheet.Range(designator).Offset(0, 4).Value()
        RawData.Activate
        MsgBox (ActiveSheet.VLookup(LookFor, "A:A", 4, True))
    End If
Next i
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T14:43:55+00:00Added an answer on May 29, 2026 at 2:43 pm

    You have several issues

    1. You need to refer to the range as Range("A:A") not "A:A"
    2. If you are using VLOOKUP rather than LOOKUP then as stated you need to be referring to a four column range , Range("A:D")
    3. You need to handle your test value not being found in A

    Sample code below for you to adapt

    Dim strLookfor as String
    Dim strOut
    strLookfor = "test"
    strOut = Application.VLookup(strLookfor, Range("A:D"), 4, True)
    If IsError(strOut) Then
        MsgBox "value not found"
    Else
    'return column D value as string
        MsgBox CStr(strOut)
    End If
    

    Follow-up

    Yes, you could use

    `strOut = Application.VLookup(strLookfor & "*", Range("A:D"), 4, True)`
    

    for this match

    bu I think Find is cleaner, ie

    Dim strLookfor As String
    strLookfor = "F71"
    Dim rng1 As Range
    Set rng1 = Sheets("Sheet1").Columns("A").Find(strfolder & "*", , xlValues, xlPart)
    If Not rng1 Is Nothing Then
        MsgBox "Match in " & rng1.Offset(0, 3)
    Else
        MsgBox strfolder & "*" & vbNewLine & "not found"
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code thats supposed to take the input entered into a
I have the following piece of python code. The code is supposed to get
I have the following javascript code: if (url.match(/?rows.*?(?=\&)|.*/g)){ urlset= url.replace(/?rows.*?(?=\&)|.*/g,rows=+document.getElementById('rowcount').value); }else{ urlset= url+&rows=+document.getElementById('rowcount').value; }
I have some code similar to the following: public interface IMyClass { MyEnum Value
I have this assembler code, which I'm supposed to translate into machine code in
Suppose I have following code package memoryleak; public class MemoryLeak { public static int
Suppose I have the following code: class some_class{}; some_class some_function() { return some_class(); }
Suppose I have the following code: class siteMS { ... function __CONSTRUCT() { require
Suppose I have the following code: foreach(string str in someObj.GetMyStrings()) { // do some
Suppose I have the following C code. unsigned int u = 1234; int i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.