+ Reply to Thread
Results 1 to 3 of 3

In need of expert advice

  1. #1
    Registered User
    Join Date
    12-12-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    20

    In need of expert advice

    Hello everyone,

    I created a Lambda function that works perfectly for me,
    Please Login or Register  to view this content.
    I assigned this function in name manager called "Conversion".

    if I manually enter the following in a cell H16 for instance, the formula works perfectly and I get the result I need.
    (H16 is part of a table, so that is why you see column references in the code)
    (Also, ConversionTable is just another table created to fine the result I need)

    Please Login or Register  to view this content.
    I am now trying to enter this exact same code, in cell H17, using the following VBA code,
    Please Login or Register  to view this content.
    The problem I am having is with the '(Conversion(G16,F16)' portion. the G16 and F16 need to represent the current row I am working on, in this case 17. But they stay consistent at G16 and F16.

    I tried changing the G16 to "range("G" & selection.row).value)' and did the same thing for the F16

    So my VBA Code looks like this,
    Please Login or Register  to view this content.
    how ever I instantly get a compile error, expected end of statement and the "G" in 'range("G" & selection.row).value' is highlighted.

    I hope all this makes sense, I tried to be as detail as I could.
    Does anyone know how to insert a lambda function using VBA where the variable(s) needed are dynamic and are base on the current row you are working on.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,970

    Re: In need of expert advice

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to consider amending your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Guideline #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-12-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    20

    Re: Using Lambda functions within VBA macro

    I was able to finally solve it using the following;
    Please Login or Register  to view this content.

+ 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] Expert advice needed: Will a simple UDF massively slow down the calculation?
    By billj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2017, 09:58 AM
  2. [SOLVED] Need your expert advice on a form created in Excel
    By Kin0823 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2014, 10:53 AM
  3. Complex VLOOK and/or Index formula question. Expert advice needed
    By GRDecker in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-13-2013, 01:21 PM
  4. Complex VLOOK and/or Index formula question. Expert advice needed
    By GRDecker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2013, 01:56 PM
  5. Replies: 0
    Last Post: 10-25-2006, 12:09 PM
  6. linking workbooks - expert advice needed!
    By JillG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2006, 06:00 PM
  7. [SOLVED] Need Expert Advice
    By Rebecca in forum Excel General
    Replies: 3
    Last Post: 03-24-2005, 01:06 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