Results 1 to 5 of 5

Thread: How can I look up the value in the next cell?

  1. #1
    New Member
    Join Date
    Sep 2019
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default How can I look up the value in the next cell?

    Hi,

    I have a set of data with a merged header cell, laid out like this:


    ---------------------------Merged header cell-----------------------------------
    Value 1 Value 2

    I am trying to return Value 2, using the header cell as the lookup value. I've tried using HLOOKUP, but it returns Value 1. Is there a way I can return Value 2 instead?

    Thanks!

  2. #2
    Board Regular
    Join Date
    Jul 2014
    Location
    The Netherlands
    Posts
    1,263
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Default Re: How can I look up the value in the next cell?

    hI,

    You've posted this question with the hope of getting an answer you can use.
    Unfortunately you gave us not enough information to go on and by doing that, made it impossible for us to answer your question in a way you can actually use the answer.

    My top tip today:
    Look at the forum rules and guidelines, the links are provided in my signature below and by doing that you'll get some helpful guidance on what information you should include in your question to create the best opportunity for us to help you.
    --------------------------------------------------------------------------------
    If you found my answer helpful, please hit the Like or Thank button.

    Please follow the forum Rules and Guidelines and use Code tags around your VBA code.

    Remember: test VBA code always on a copy of your file because usually you can't use <undo>

  3. #3
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,842
    Post Thanks / Like
    Mentioned
    83 Post(s)
    Tagged
    15 Thread(s)

    Default Re: How can I look up the value in the next cell?

    Try this

     ABCDEFG
    1Merged header cellOther header cell   
    2Value1Value2Value3Value4  Value2

    CellFormula
    G2=INDEX(A1:D2,2,MATCH("Merged header cell",A1:D1,0)+1)
    Regards Dante Amor

  4. #4
    New Member
    Join Date
    Sep 2019
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How can I look up the value in the next cell?

    Quote Originally Posted by DanteAmor View Post
    Try this

    A B C D E F G
    1 Merged header cell Other header cell
    2 Value1 Value2 Value3 Value4 Value2

    Cell Formula
    G2 =INDEX(A1:D2,2,MATCH("Merged header cell",A1:D1,0)+1)
    Sorry, it's taken me a couple of weeks to get back to this project. Thank you very much, that has worked perfectly!

  5. #5
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,842
    Post Thanks / Like
    Mentioned
    83 Post(s)
    Tagged
    15 Thread(s)

    Default Re: How can I look up the value in the next cell?

    I'm glad to help you. Thanks for the feedback.
    Regards Dante Amor

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •