+ Reply to Thread
Results 1 to 3 of 3

VBA: Easy way to get coresponding value from a table

  1. #1
    Registered User
    Join Date
    11-19-2014
    Location
    Trencin, Slovakia
    MS-Off Ver
    10
    Posts
    7

    VBA: Easy way to get coresponding value from a table

    Hi, I have a small table(see the pic below) and I would just like to assign the corresponding date value from column B to a chosen number from column D and assign it to the variable Output1. The chosen number from column D has the same row number as the date value. I did not find anything easy except for some ugly INDEX/MATCH method. Thank you so much!

    My code so far:
    Please Login or Register  to view this content.
    prtscr.JPG

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: VBA: Easy way to get coresponding value from a table

    Hi,

    Here is the code inside the attached that might be closer to what you want.
    Please Login or Register  to view this content.
    The Sub is triggered when you change the number in A4. I think you might really want a Function to do your work. See cell F4 for that function.

    Get_Time Sub vs Function.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    11-19-2014
    Location
    Trencin, Slovakia
    MS-Off Ver
    10
    Posts
    7

    Re: VBA: Easy way to get coresponding value from a table

    Thank you very much!

+ 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. if odd cell = yes then sum of coresponding even cells
    By vinayak patil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-02-2014, 06:52 AM
  2. Replies: 3
    Last Post: 08-27-2013, 09:35 AM
  3. [SOLVED] find all instances and add coresponding values?
    By t0mc in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-09-2012, 05:38 PM
  4. Indicate shift type coresponding to the time of day in a cell...
    By Alwpg in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 01-03-2012, 05:28 AM
  5. Find a value in a column and extract the coresponding value
    By N-ter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-25-2010, 11:29 AM
  6. Lookup value in other sheet - return coresponding value
    By SalmatMikeG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2007, 08:49 PM
  7. [SOLVED] looking for another same value cell in a range and returning a coresponding value
    By dawid72 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-09-2006, 03: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