+ Reply to Thread
Results 1 to 14 of 14

VBA Vlookup Problem

Hybrid View

ahwestrich VBA Vlookup Problem 08-13-2007, 04:34 PM
rylo HI Is your calculation... 08-13-2007, 07:02 PM
ahwestrich Yeah, the calculations are... 08-13-2007, 07:12 PM
rylo Hi Can't see why, but the... 08-13-2007, 07:27 PM
ahwestrich i just tried that and it did... 08-13-2007, 07:42 PM
rylo Hi What reference style do... 08-13-2007, 08:11 PM
ahwestrich I used the R1C1 08-14-2007, 10:52 AM
rylo Hi Try changing it to the... 08-14-2007, 05:29 PM
ahwestrich I've tried using both R1C1... 08-14-2007, 06:22 PM
  1. #1
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Can't see why, but the only thing I can think of is that it is getting hooked up on the R1C1 format

    Try

    Range("F2").Formula = "=IF(ISNA(VLOOKUP(G2,Lookup!A:A,1,FALSE)),""Not Found"",""Found"")"
      Range("F2").AutoFill Destination:=Range("F2:F65000")
    Also, do you really want it to go down that far? Will take up a lot of memory.....


    rylo

  2. #2
    Registered User
    Join Date
    08-13-2007
    Posts
    7
    i just tried that and it did not work either

    You're right about the memory...this is just a test to make sure I can get this macro to work as planned.

    Unfortunately this stumbling block has hindered my progress

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    What reference style do you have in your sheet? R1C1, or non R1C1?


    rylo

  4. #4
    Registered User
    Join Date
    08-13-2007
    Posts
    7
    I used the R1C1

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try changing it to the non R1C1 and run the code. If it calculates properly that way, then add the conversion to the start of the code, then turn it back again at the end. Record a macro to get the code to do those steps.

    If that doesn't work, then let us know...

    rylo

  6. #6
    Registered User
    Join Date
    08-13-2007
    Posts
    7
    I've tried using both R1C1 and non and both didn't work. Recording the macro hasn't worked either because it gives me that same code. Is there code for the cursor placed in the formula bar then to press enter. That is what I have to do in order for it to calculate correctly.

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    If the workbook isn't too large, then try dragging each of the sheets to a new workbook, save it and see if that will work with the R1C1 set to the A1 format.

    If that doesn't work, then the only thing I can think of is to go down the column and make each of the formulas equal to the formula. This should have to same effect as editing, but (a) you shouldn't need to do it and (b) it will take some time.

    Any chance of putting up the workbook, or an example file that is doing the same thing???

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1