+ Reply to Thread
Results 1 to 4 of 4

Display specific value with VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    03-09-2016
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    9

    Display specific value with VBA

    Hi
    I hope someone can solve my simple issue from this following simple data :

    A B C D E F G
    Apple 500 -> Watermelon 700
    Orange 250 -> Manggo 1000
    Manggo 1000 -> Pineaple 600
    Pineaple 600 -> Apple 500
    Watermelon 700


    all I want to do is, in column F displays the results as in column B base in column E using VBA

    sorry if the question as has already been made in this forum, and sorry for my bad english

    Thank you in advance
    Last edited by kayzip; 03-30-2016 at 01:28 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,662

    Re: How do I make this with VBA ?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Display specific value with VBA

    there are many ways to achieve what you want
    here is one way

    if your sheet is set out like this

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    1
    Apple
    500
    -> Watermelon
    2
    Orange
    250
    -> Manggo
    3
    Manggo
    1000
    -> Pineaple
    4
    Pineaple
    600
    -> Apple
    5
    Watermelon
    700
    orange

    then something like this can be use

    Sub LookUpValue()
        
        Dim cell As Range
        
        For Each cell In Range("E1:E5")
            
            cell.Offset(, 1) = Range("A:A").Find(cell.Value).Offset(, 1)
            
        Next
        
    End Sub
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    03-09-2016
    Location
    indonesia
    MS-Off Ver
    2007
    Posts
    9

    Re: Display specific value with VBA

    That was Exactly what I am looking for.
    thanks humdingaling for the help

+ 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. How to make this formula in excell sheet..please help me to make this..
    By mdinesh223 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-13-2015, 05:01 AM
  2. Replies: 8
    Last Post: 11-08-2013, 07:46 AM
  3. trying to make a button on summary page to make new working sheet
    By dbzisme in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-07-2013, 05:41 PM
  4. Replies: 0
    Last Post: 03-08-2013, 06:34 AM
  5. Replies: 7
    Last Post: 12-27-2012, 10:53 PM
  6. [SOLVED] make macros usable! make instructions in plain english !!!!
    By Brainless_in_Boston in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-02-2006, 11:30 AM
  7. Replies: 0
    Last Post: 01-12-2005, 10:06 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