Dynamic Title Header

m3n4c3d

New Member
Joined
May 16, 2018
Messages
1
Hi,


I want to be able to search a policy number and get the appropriate info in the same sheet. I want my header to adapt to the type of information.


Let say my header is on A1 through Z1. This sheet is all my data set.

A2 and below are my policy numbers, B2 and bellow are my insurance type of policies which will populate or not the other collumns.

[TABLE="width: 500"]
<tbody>[TR]
[TD]policy #[/TD]
[TD]type[/TD]
[TD]coverage[/TD]
[TD]Franchise[/TD]
[TD]Cancellation[/TD]
[TD]etc.[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]car[/TD]
[TD]N/A[/TD]
[TD]1000[/TD]
[TD]N/A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]21458[/TD]
[TD]house[/TD]
[TD]yes[/TD]
[TD]100[/TD]
[TD]1000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



in another sheet I want to build a search cell so my policy number is extracted with all the relevant info. I would like the Title header linked to all the N/A cell to not be displayed.

if policy #12345 is typed:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Policy #[/TD]
[TD]Type[/TD]
[TD]Franchise[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]=vlookup(A2(...[/TD]
[TD]=vlookup(A2;...[/TD]
[/TR]
</tbody>[/TABLE]


if policy # 21458 is typed my header title will hide based on if a cell is N/A or not
[TABLE="width: 500"]
<tbody>[TR]
[TD]Policy #[/TD]
[TD]Type[/TD]
[TD]Coverage[/TD]
[TD]Franchise[/TD]
[TD]Cancellation[/TD]
[/TR]
[TR]
[TD]21458[/TD]
[TD]=v(lokkup(A2(...[/TD]
[TD]vlookup...[/TD]
[TD]vlookup...[/TD]
[TD]vlookup...[/TD]
[/TR]
</tbody>[/TABLE]


I dont have difficulty for looking up through data but I wonder how I can put my title header more adaptive based on criteria.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][th]
F
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]policy #[/td][td]policy #[/td][td]policy #[/td][td]Franchise[/td][td]Cancellation[/td][td]etc.[/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]
12345​
[/td][td]car[/td][td]
#N/A​
[/td][td]
1000​
[/td][td]
#N/A​
[/td][td][/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]
21458​
[/td][td]house[/td][td]yes[/td][td]
100​
[/td][td]
1000​
[/td][td][/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]policy #[/td][td]policy #[/td][td]Franchise[/td][td][/td][td][/td][td][/td][/tr]


[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]
12345​
[/td][td]car[/td][td]
1000​
[/td][td][/td][td][/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet52[/td][/tr][/table]

Array formula in cell B5:
=IFERROR(INDEX($B$1:$E$1,SMALL(IF(NOT(ISNA(INDEX($B$2:$E$3,MATCH($A$6,$A$2:$A$3,0),0))),MATCH(COLUMN($B$2:$E$3),COLUMN($B$2:$E$3)),""),COLUMNS($A$1:A1))),"")

Copy cell B5 and paste to cells to the right as far as needed.

Formula in cell B6:
=INDEX($B$2:$E$3,MATCH($A6,$A$2:$A$3,0),MATCH(B$5,$B$1:$E$1,0))

Copy cell B6 and paste to cells to the right as far as needed.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top