Looking for a formula to insert column header text

sammipd

Board Regular
Joined
Jun 6, 2010
Messages
67
I must compile over 60 multipage paper surveys. The 1st question has 20 possible responses and the users marked all that applied. The easiest method I can come up with is to "x" the appropriate box and excel replace the "x" with the column title. But I can't get it to work. Can you suggest a formula? or another method?
Thank you!


dogcatbirdfishsnake
Survey 1dogcatfish
Survey 2catbirdsnake
Survey 3xxx

<tbody>
</tbody>


<colgroup><col><col span="7"></colgroup><tbody>
</tbody>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I must compile over 60 multipage paper surveys. The 1st question has 20 possible responses and the users marked all that applied. The easiest method I can come up with is to "x" the appropriate box and excel replace the "x" with the column title. But I can't get it to work. Can you suggest a formula? or another method?
Thank you!


dogcatbirdfishsnake
Survey 1dogcatfish
Survey 2catbirdsnake
Survey 3xxx

<tbody>
</tbody>


<tbody>
</tbody>

So, you want the three x's to be dog, bird?

Put the following formula in G4:

=IF(B4="x", B$1,"")

Then, copy the formula across the next four columns (H, I, J, K). You can also copy it down if there are more survey than 3.

Once that is done, copy the new region, which you just added a formula, and paste it by value to B4.
 
Upvote 0
Or,

try to use custom cell format to achieve your target

1[ Asume your data put in A1:F4, with header "dog", "cat", "bird", "fish" and "snake" in B1:F1

2] Select B2:B4 >> Custom Cell Format, enter: ;;;"dog"

3] Select C2:C4 >> Custom Cell Format, enter: ;;;"cat"

4] Select D2:D4 >> Custom Cell Format, enter: ;;;"bird"

5] Select E2:E4 >> Custom Cell Format, enter: ;;;"fish"

6] Select F2:F4 >> Custom Cell Format, enter: ;;;"snake"

Then,

7] Enter "x" in any cells of range B2:F4, it will change to the header name.

Regards
Bosco
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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