+ Reply to Thread
Results 1 to 3 of 3

Using Lookup Function Formula in VBA

  1. #1
    Registered User
    Join Date
    03-27-2017
    Location
    Penticton, BC
    MS-Off Ver
    2016
    Posts
    33

    Using Lookup Function Formula in VBA

    Hi Smarters!

    I'm building a form in VBA (excel). I have a chart in my spreadsheet called "dipchart". It has Cm's and the corresponding L of fuel. In a regular excel sheet I can type a "cm" value in one box and have the corresponding Volume populate an adjacent cell using the following formula:

    =LOOKUP(B10,'DipChart'!A$2:A2011,'DipChart'!C$2:C2011)

    I would like to assign that formula in my VBA form. I've gotten as far as below. But of course it's pretty much laughing at me. My Look up textbox is called TCDCMDIP and the textbox that I'd like to populate is called TCDDIPCHARTVOL.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Using Lookup Function Formula in VBA

    Untested

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Using Lookup Function Formula in VBA

    Or something like this maybe ?

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. Formula/Function to lookup and display value
    By pingman3 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-06-2015, 01:08 PM
  2. Help with a lookup function within a formula?
    By Janbi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2015, 04:38 PM
  3. Replies: 4
    Last Post: 10-15-2014, 12:38 AM
  4. Create a lookup formula with an If or Lookup function
    By afountas21 in forum Excel General
    Replies: 2
    Last Post: 09-05-2012, 06:53 PM
  5. [SOLVED] Excel lookup function or conditional formula?
    By atlpersonnel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-15-2012, 04:37 AM
  6. try to find formula for Lookup Function
    By sighlent1 in forum Excel General
    Replies: 2
    Last Post: 07-21-2011, 04:51 PM
  7. Using Lookup function in a larger formula
    By rgold in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-10-2008, 03:08 PM

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