+ Reply to Thread
Results 1 to 2 of 2

Macro To Insert Vlookup Formula in cells, when condition is met

  1. #1
    Registered User
    Join Date
    05-09-2022
    Location
    Lebanon
    MS-Off Ver
    2019
    Posts
    4

    Macro To Insert Vlookup Formula in cells, when condition is met

    Hi All,

    I am looking for a macro that would insert in column AB a vlookup formula when column N is different than "".

    I have the following code, but I can't know how to fix it with vlookup. It usually works when it is a normal formula that i want to insert and not a vlookup.
    I tried modifying it to the following :

    Please Login or Register  to view this content.
    But the C.row highlighted in red don't work, and formula written is Vlookup(N&C.row,'Res. Rates'!B:S,18,0).

    Kindly advise.

    Regards,

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,359

    Re: Macro To Insert Vlookup Formula in cells, when condition is met

    There are other ways of doing this but for the sake of learning, the below should work for you:
    Please Login or Register  to view this content.
    The C.Row needs to be outside of the ""
    If things don't change they stay the same

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using the right formula to MATCH/INDEX/VLOOKUP cells that follow a specific condition
    By milkychips in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-29-2016, 09:19 AM
  2. [SOLVED] Formula to break cells but also to insert different text if condition met
    By gokica in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-19-2014, 08:02 AM
  3. Excel Macro to insert two rows based on condition and copy and paste multiple cells
    By mannabhalo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-13-2012, 12:56 PM
  4. [SOLVED] Macro Insert Vlookup Formula
    By smmeader in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2012, 12:18 PM
  5. Macro that will insert rows with condition
    By Shimba2011 in forum Excel General
    Replies: 0
    Last Post: 11-07-2011, 03:14 PM
  6. insert text based on vlookup condition in two column
    By isabella in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-10-2010, 09:19 PM
  7. Cells value insert into macro Formula
    By frenic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2008, 11:35 AM

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