ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I insert a cell based on its match with an adjacent cell? (https://www.excelbanter.com/excel-worksheet-functions/66513-how-do-i-insert-cell-based-its-match-adjacent-cell.html)

Gabbon

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

Biff

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" wrote in message
...
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




Gabbon

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" wrote in message
...
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





daddylonglegs

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

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


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=503512


Gabbon

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

Peo Sjoblom

how do I insert a cell based on its match with an adjacent cel
 
=IF(formula="","",formula)

--
Regards,

Peo Sjoblom

Portland, Oregon




"Gabbon" wrote in message
...
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



Gabbon

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

Peo Sjoblom

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" wrote in message
...
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



daddylonglegs

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

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


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=503512


vezerid

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


Gabbon

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


Gabbon

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?

Gabbon

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))



All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com