Results 1 to 4 of 4

[Solved] VBA Vlookup and complex Formula problem

Threaded View

Bansheete [Solved] VBA Vlookup and... 11-29-2013, 04:25 PM
GC Excel Re: VBA Vlookup and complex... 11-29-2013, 04:38 PM
Olly Re: VBA Vlookup and complex... 11-29-2013, 04:48 PM
Bansheete Re: VBA Vlookup and complex... 12-03-2013, 08:23 AM
  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2007
    Posts
    2

    Wink [Solved] VBA Vlookup and complex Formula problem

    Hi all,
    Im trying to turn this formula:

    =MID(VLOOKUP(B103;'Extracto Siebel'!$1:$1048576;5;FALSE);SEARCH("113";VLOOKUP(B103;'Extracto Siebel'!$1:$1048576;5;FALSE);1);13)

    Into something i can put in a macro so it goes automatically in a range with a macro.

    My problem is that "B103" is a variable and refers to 3 cells to the left of where the cell is.

    So. i used this:

    Dim rngCell As Range
           For Each rngCell In Range("B" & ActiveCell.Row & ":B" & (ActiveCell.Row + count))
        rngCell.Offset(0, 3) = Application.WorksheetFunction.Mid((Application.WorksheetFunction.VLookup(rngCell.Value, Sheets("Extracto Siebel").Range("1:1048576"), "5", False)), Application.WorksheetFunction.Search("113", Application.WorksheetFunction.VLookup(rngCell.Value, Sheets("Extracto Siebel").Range("1:1048576"), "5", False), 1), 13)
        
        Next
    But It does not work.

    This one works, but fills everything up with a Fixed reference: "$B$103"
    Range("E" & ActiveCell.Row, "E" & (ActiveCell.Row + count)).Formula = "=MID(VLOOKUP(" & ActiveCell.Offset(0, -3).AddressLocal & ",'Extracto Siebel'!$1:$1048576,5,FALSE),SEARCH(""113"",VLOOKUP(" & ActiveCell.Offset(0, -3).AddressLocal & ",'Extracto Siebel'!$1:$1048576,5,FALSE),1),13)"
    Any way to do it??

    Thanks in Advance!!!!
    Last edited by Bansheete; 12-03-2013 at 08:24 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Complex Vlookup formula
    By superdonk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2013, 11:58 AM
  2. [SOLVED] Complex if/and formula problem
    By dab37843 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2012, 01:21 PM
  3. Complex vlookup formula question
    By dta1984 in forum Excel General
    Replies: 54
    Last Post: 11-18-2011, 12:23 AM
  4. Help with complex formula - H and VLOOKUP
    By supraruss in forum Excel General
    Replies: 8
    Last Post: 07-01-2008, 12:04 PM
  5. Replies: 2
    Last Post: 03-06-2006, 12:40 PM

Tags for this Thread

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