+ Reply to Thread
Results 1 to 11 of 11

How to take first Value by lookup formula in macro

  1. #1
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    How to take first Value by lookup formula in macro

    Hi,

    i am able to take last value of particular column but i dont know how to evaluate in lookup formula by extracting first value.

    Please Login or Register  to view this content.
    Please suggest
    Last edited by mohan.r1980; 01-18-2018 at 04:51 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: How to take first Value by lookup formula in macro

    Isn't it just
    Please Login or Register  to view this content.
    ?

  3. #3
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: How to take first Value by lookup formula in macro

    hi Jindon Sir,

    great!!, Nice to see you and also thanks for another method to get the last value.

    how can i get first value of same columns?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: How to take first Value by lookup formula in macro

    It should get the first match...

  5. #5
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: How to take first Value by lookup formula in macro

    ohh no

    sorry sir i thought its a last value variable result i.e. iLastCenter.

    actually i expected iFirstCenter .

    my misunderstanding.

    thank you so much for your solution, its working fine.

    have a good day and good health.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: How to take first Value by lookup formula in macro

    Ahh, should have used iFirstCenter...

  7. #7
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: How to take first Value by lookup formula in macro

    Hi Jindon Sir,

    sorry for asking same level question.

    while evaluate in 2 sheets it shows me error.

    Please Login or Register  to view this content.
    my matching value is in another sheet(shtEmergencyBarcode) and fetching data in first sheet (shtMainData).

    is it possible in evaluate function.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: How to take first Value by lookup formula in macro

    Try change to
    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: How to take first Value by lookup formula in macro

    Fantastic!!!

    Exactly i wanted

    thanks again sir.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: How to take first Value by lookup formula in macro

    Remember

    Formula string in Evaluate method refers to its parent object
    shtMainData.Evaluate
    so, the address without sheet name should be in shtMainData.
    And also have limit of 255 characters, so make it as short as possible.
    Last edited by jindon; 01-18-2018 at 08:30 AM.

  11. #11
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: How to take first Value by lookup formula in macro

    Thanks Sir for your nice explanation.
    i do remember it.

+ 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] Need Macro/Formula for Cost Lookup on another Excel Tab
    By eguirocker3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2014, 09:33 AM
  2. [SOLVED] Macro to put lookup formula on visible cells only
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2013, 05:43 AM
  3. lookup value for a vlookup formula in VBA for an excel macro
    By nskrbin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2013, 05:32 PM
  4. Help with Macro/formula - Lookup that returns Dropdown List of matches
    By alfykunable in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2012, 12:43 AM
  5. macro NOT WORK for cell value which contains formula(lookup)
    By CLASSMATE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2012, 02:32 PM
  6. macro to update two lookup formula answer
    By johncena in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2010, 11:23 AM
  7. Excel Macro/Formula to perform Lookup
    By floridagunner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2007, 02:59 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