ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pull value from column heading (https://www.excelbanter.com/excel-worksheet-functions/146962-pull-value-column-heading.html)

Cecilia

Pull value from column heading
 
Hello--

I have a table that looks like this:

135569 135572 135574 135577 135578
7664502273 1 1 1 1
7664505027 1 1 1 1
9.78158E+11 1


For each row, I need to pull the column heading for any instances where
there is a 1 and have that entered in it's own separate cell or separated by
a comma if in a single cell.

I've tried some index functions, but am not having any luck.

Any ideas?? Thanks so much for your help!!!

Cecilia

Dave Peterson

Pull value from column heading
 
Are the choices for those cells with 1 in them either a 1 or empty?

If that's true...

Select the range to fix (B2:F4 for this sample)
edit|goto|special|constants
notice that the selection is now just those cells that are not empty (the ones
that contain 1).

Take note of the activecell's (the white one) column.

type an equal sign and the column letter and then $1
for me, I typed: =C$1
But instead of hitting enter, hit ctrl-enter to fill each of those cells with 1
in it.

Now select that range again (B2:F4)
edit|copy
edit|paste special|Values
(if you want.)


Cecilia wrote:

Hello--

I have a table that looks like this:

135569 135572 135574 135577 135578
7664502273 1 1 1 1
7664505027 1 1 1 1
9.78158E+11 1

For each row, I need to pull the column heading for any instances where
there is a 1 and have that entered in it's own separate cell or separated by
a comma if in a single cell.

I've tried some index functions, but am not having any luck.

Any ideas?? Thanks so much for your help!!!

Cecilia


--

Dave Peterson


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

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