![]() |
Replace all non blanks in a column with column header
I think I need a macro to do this, but I can't figure out how to write this
macro. I am using excel 2003. My first row contains what I consider to be column headers. I'd like to search through each column in a worksheet and replace any x in the column with the column header. The following is an example: col1 col2 col3 col4 col5 row1 row2 x row3 x I would like the "x" in row2 replaced with "col2" and the x in row 3 with "col4" Frankly, I have no clue where even to begin on this one. I appreciate any help anyone can provide. Thanks, Holly |
Replace all non blanks in a column with column header
Select column 2, press F5, special and select constants, click OK, click in
the formula bar and type Col2, press Ctrl + Enter, repeat for the other columns -- Regards, Peo Sjoblom http://nwexcelsolutions.com "hnyb1" wrote in message ... I think I need a macro to do this, but I can't figure out how to write this macro. I am using excel 2003. My first row contains what I consider to be column headers. I'd like to search through each column in a worksheet and replace any x in the column with the column header. The following is an example: col1 col2 col3 col4 col5 row1 row2 x row3 x I would like the "x" in row2 replaced with "col2" and the x in row 3 with "col4" Frankly, I have no clue where even to begin on this one. I appreciate any help anyone can provide. Thanks, Holly |
Replace all non blanks in a column with column header
Hi Peo,
That's amazing! Thanks for revealing it. Ken Johnson |
Replace all non blanks in a column with column header
Thank you!
"Peo Sjoblom" wrote: Select column 2, press F5, special and select constants, click OK, click in the formula bar and type Col2, press Ctrl + Enter, repeat for the other columns -- Regards, Peo Sjoblom http://nwexcelsolutions.com "hnyb1" wrote in message ... I think I need a macro to do this, but I can't figure out how to write this macro. I am using excel 2003. My first row contains what I consider to be column headers. I'd like to search through each column in a worksheet and replace any x in the column with the column header. The following is an example: col1 col2 col3 col4 col5 row1 row2 x row3 x I would like the "x" in row2 replaced with "col2" and the x in row 3 with "col4" Frankly, I have no clue where even to begin on this one. I appreciate any help anyone can provide. Thanks, Holly |
All times are GMT +1. The time now is 02:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com