+ Reply to Thread
Results 1 to 13 of 13

how do I insert a cell based on its match with an adjacent cell?

  1. #1
    Gabbon
    Guest

    how do I insert a cell based on its match with an adjacent cell?

    Hi,
    There's got to be a way to do this (mail merge style perhaps...)
    I would like to insert the entry/ies under a heading in a table in one
    worksheet whenever that heading matches the data entered in a separate
    worksheet.
    Presently I can find no way to do this in Excel.
    Please can you suggest a way to do this...
    Thanks
    G

  2. #2
    Biff
    Guest

    Re: how do I insert a cell based on its match with an adjacent cell?

    Need a better more detailed explanation.

    The more details you provide, the easier it is to find a solution!

    Biff

    "Gabbon" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > There's got to be a way to do this (mail merge style perhaps...)
    > I would like to insert the entry/ies under a heading in a table in one
    > worksheet whenever that heading matches the data entered in a separate
    > worksheet.
    > Presently I can find no way to do this in Excel.
    > Please can you suggest a way to do this...
    > Thanks
    > G




  3. #3
    Gabbon
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    Hi,
    Thanks for your reply.
    I have a table with three headings (could be more soon), and a sub-entry
    under each heading.
    I also have a row in which those headings appear occasionally. I am looking
    for a way to enter the sub-entry of those headings in the row underneath at
    every point at which those three headings appear.
    (This is pretty much the style of the Word mail merge operation).
    Can you point me in the right direction? Or any direction--I have looked
    through help and can't locate where to find the answer
    Thanks,
    Gabbon

    "Biff" wrote:

    > Need a better more detailed explanation.
    >
    > The more details you provide, the easier it is to find a solution!
    >
    > Biff
    >
    > "Gabbon" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > > There's got to be a way to do this (mail merge style perhaps...)
    > > I would like to insert the entry/ies under a heading in a table in one
    > > worksheet whenever that heading matches the data entered in a separate
    > > worksheet.
    > > Presently I can find no way to do this in Excel.
    > > Please can you suggest a way to do this...
    > > Thanks
    > > G

    >
    >
    >


  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If your headings are in A1:C1 and sub-headings in A2:C2

    If you want the appropriate sub-heading to appear in E11, for instance, when you put one of the headings in E10 then one way would be to use this formula in E11

    =HLOOKUP(E10,$A$1:$C$2,2,0)

    You can copy this formula along the row

  5. #5
    Gabbon
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    Perfect!
    Thank you very much--I appreciate it
    (I still need to find a way to have the cell appear blank when the sub-entry
    data is blank. Entering a space does the trick, but I'm sure there is
    another formula to use to return a blank cell rather than a cell with 0 in it)
    Gabon

  6. #6
    Peo Sjoblom
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    =IF(formula="","",formula)

    --
    Regards,

    Peo Sjoblom

    Portland, Oregon




    "Gabbon" <[email protected]> wrote in message
    news:[email protected]...
    > Perfect!
    > Thank you very much--I appreciate it
    > (I still need to find a way to have the cell appear blank when the
    > sub-entry
    > data is blank. Entering a space does the trick, but I'm sure there is
    > another formula to use to return a blank cell rather than a cell with 0 in
    > it)
    > Gabon



  7. #7
    Gabbon
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    I've come across another problem.
    I'm trying to match the heading to a date! :-(
    And I only wish to match it with the day and month, but not the year.
    Is there any way to match with the month and day, and exclude the year for
    the calculation?
    I do very much appreciate the help,
    Gabbon

  8. #8
    Peo Sjoblom
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    I think we need some more info, what are the contents of the headers and
    what is the content of the lookup cell?

    --
    Regards,

    Peo Sjoblom

    Portland, Oregon




    "Gabbon" <[email protected]> wrote in message
    news:[email protected]...
    > I've come across another problem.
    > I'm trying to match the heading to a date! :-(
    > And I only wish to match it with the day and month, but not the year.
    > Is there any way to match with the month and day, and exclude the year for
    > the calculation?
    > I do very much appreciate the help,
    > Gabbon



  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Based on my previous example perhaps

    =HLOOKUP(TEXT(E10,"dd-mm"),TEXT($A$1:$C$2,"dd-mm"),2,0)

    conformed with CTRL+SHIFT+ENTER

  10. #10
    vezerid
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    Gabbon,
    I would say you need a table of 4 columns: First column a date and the
    remaining three ones your current headings.
    It seems to me you want is to select a date, and then to report the
    value of the three sub-headings for the row of this date.

    If I have understood you correctly, then the following formula will do:

    =IF(VLOOKUP(date, $A:$D, MATCH(heading,
    $A$1:$D$1,0))="","",VLOOKUP(date, $A:$D, MATCH(heading, $A$1:$D$1,0)))

    Supply cell references for date and heading.

    HTH
    Kostis Vezerides


  11. #11
    Gabbon
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    Thank you so very much (how do you find this stuff--I looked all over help
    and could not locate it)
    The formula:

    > =HLOOKUP(TEXT(E10,"dd-mm"),TEXT($A$1:$C$2,"dd-mm"),2,0)
    > confirmed with CTRL+SHIFT+ENTER


    Was perfect, and does as I sought (brilliant!)
    Thanks again


  12. #12
    Gabbon
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    "Peo Sjoblom" wrote:

    > =IF(formula="","",formula)


    @Peo Sjoblom
    I'm not sure what you mean... The cell result I wish to avoid is the #N/A.

    If E11 has the result value #N/A, and I enter the formula:
    =IF(E11="","",E11) in cell E12

    All I (still) get is #N/A

    Is there a way to avoid the #N/A result?

  13. #13
    Gabbon
    Guest

    Re: how do I insert a cell based on its match with an adjacent cel

    "Peo Sjoblom" wrote:

    > =IF(formula="","",formula)


    Not quite:
    if(formula="","",formula) only returns the #N/A value.

    What you need is the additional use of the isna function, which will return
    a usable value (TRUE, or FALSE) based on the presence, or otherwise of the
    #N/A value.

    The following will return a blank cell if the value in cell_ref is #N/A:

    =IF(ISNA(cell_ref)=TRUE,"",(cell_ref))


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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