Copying the column heading into all non-empty cells

Hello!

I hope someone might be able to help me with this one. I have a ver
simple but big spreadsheet (120 columns and 3000 rows).

The first row is a header row and then all the cells in each column ar
either blank or they have a Y in them. (The headings all represent hote
amenities eg. pool, creche, tennis courts, the 3000 rows are 300
hotels, and the Y indicates if each hotel has that amenity or not.)

All I want to do is find a quick way of replacing all the Y's wit
their respective column headings/amenities. i.e. in the "Pool" column
I want to have Pool written everywhere that a Y is currently written.

Does anyone know of a quick and easy way to do this? The best I ca
come up with so far is to go through each of the 120 columns and us
the Find and Replace method. However, as I'll be getting a ne
spreadsheet full of hotels each week I'd like to find a les
time-consuming method if possible!

Any ideas would be very gratefully received!! Thanks!

Lizzy

--
Lizzy
-----------------------------------------------------------------------
LizzyD's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1617
View this thread: http://www.excelforum.com/showthread.php?threadid=27606

0
11/7/2004 8:09:06 PM
excel.newusers 15348 articles. 2 followers. Follow

1 Replies
579 Views

Similar Articles

[PageSpeed] 30

Lizzy

One method.........

Assuming you have your current data on Sheet1

Copy the header row only to a new worksheet.

In new worksheet A2 enter  =IF(Sheet1!A2="y",A$1)

NOTE: the A$1.......the $ sign must be entered.

Drag/copy across 120 columns and down 3000 rows.

Copy the full range and in place Paste Special>Values>OK>Esc then delete
Sheet1.

You could record a macro while doing this and assign the macro to a button.

Gord Dibben Excel MVP

On Sun, 7 Nov 2004 14:09:06 -0600, LizzyD
<LizzyD.1fdaem@excelforum-nospam.com> wrote:

>
>Hello!
>
>I hope someone might be able to help me with this one. I have a very
>simple but big spreadsheet (120 columns and 3000 rows).
>
>The first row is a header row and then all the cells in each column are
>either blank or they have a Y in them. (The headings all represent hotel
>amenities eg. pool, creche, tennis courts, the 3000 rows are 3000
>hotels, and the Y indicates if each hotel has that amenity or not.)
>
>All I want to do is find a quick way of replacing all the Y's with
>their respective column headings/amenities. i.e. in the "Pool" column,
>I want to have Pool written everywhere that a Y is currently written.
>
>Does anyone know of a quick and easy way to do this? The best I can
>come up with so far is to go through each of the 120 columns and use
>the Find and Replace method. However, as I'll be getting a new
>spreadsheet full of hotels each week I'd like to find a less
>time-consuming method if possible!
>
>Any ideas would be very gratefully received!! Thanks!
>
>LizzyD

0
Gord
11/7/2004 9:29:02 PM
Reply:

Similar Artilces:

Problem inserting a column!!!
Hello all. I just accessed a worksheet which Im trying to add a column to... I highlight the column which i want the new column inserted ...and when i try to insert a column it doesnt work! A warning message comes up stating that a column cannot be inserted until blank cells are removed from the right side of the sheet or something to that effect!? Whats going on??? Thank you. -- londonchick ------------------------------------------------------------------------ londonchick's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24529 View this thread: http://www.e...

Sort
We've recently made a very long spreadsheet with about 80 columns. BAD things happen! When people do a lazy sort - that is, ctrl home, Sort and use the populated defaults, Excel only "selects" 64 columns. Of course this totally pooches the data and creates disconnects. No problems when the user selects the whole spreadsheet (by selecting the upper lefthand corner), sorts and fills in the criteria themselves. My question is, is this for real or am I imagining it? Is there a limit of 64 columns in Excel on that lazy sort? We're dealing with the workaround, I j...

How can I create a graph & execute Excel from a non- MS environme
I would like to set up an application that can be run from Unix or another operating system that can be used to display a graph in Excel.(maybe a perl script, or something?) I can create a csv file from the data coming from a non-microsoft environment. I would like to be able to then run a unix system command, or a command that can be executed from the "run" line from MS Start menu that would use this data to open Excel and display the data as a chart. CJ Dev Wrote: > I would like to set up an application that can be run from Unix o > another > operating system that...

Conditionally format points based on a third column
I would like the color of my data points to vary based not on their x or y value, but rather on a third column running alongside them. How can I do it? Assuming your third column is column "C" and that you would want to change the colors of the XY points based on the names Jim, Frank, or Kim, a VBA option could look like this (does not include any error handling): Sub ChangeXYColors() Application.ScreenUpdating = False Dim Rng As Range Cnt = 1 For Each Rng In Range("C2:C10") ActiveSheet.ChartObjects("Chart1").Activate ActiveChart.Seri...

Include contact e-mail address column
Is there a way to include the e-mail address column in the contact list by account report? You will need Crystal Reports 9.2.2 installed on a client computer plus the Crystal Enhancements for CRM (from the CRM installation CDs) in order to modify reports. -- Matt Wittemann http://icu-mscrm.blogspot.com "Agnes" wrote: > Is there a way to include the e-mail address column in the contact list by > account report? Thank's Matt. "MattNC" wrote: > You will need Crystal Reports 9.2.2 installed on a client computer plus the > Crystal Enhancements ...

Multiple choices for a cell
I am creating a worksheet which deals with employee or job candidates qualifications. Each cell will hold the various details pertaining to a person's qualifications. Different people have different degrees. This will be all stored in a single cell and separated by a comma. Is it possible to create some sort of custom or drop down box which contains controls or check boxes so as to create a standardised list of qualifications the data entry clerk can choose from? For example, i would like a cell to have a drop down box, which is a field that displays the qualifications a particular gra...

help with spliting data cells
I am looking for assistance with splitting data between cells. I have a column of data (first (space) last name). I need to split that column into two seperate columns so each name value is in it;s own cell and i end with 2 seperate columns. (john smith) to (john) (smith) Please advise if this is easy and can be done. Thanks, Phil pcavalcanto@Aol.com -- pcavalcanto ------------------------------------------------------------------------ pcavalcanto's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=32212 View this thread: http://www.excelforum.com/showthread...

Select range for function in a cell
Hi, is it possible to select create a formula in a cell. such as =SUM( and have the cursor be between the () so the user can select th appopriate range to enter? Or would this just be done separately. (Since one would need to know the range and WHERE to put the formul in..ie. what cell) similar to if you hit the autosum button but ther are no numbers above or the left, it simply waits for the user t select a range and then hits enter. THanks! -- Message posted from http://www.ExcelForum.com Hi if I understood you correctly: No -- Regards Frank Kabel Frankfurt, Germany > Hi, is it p...

Copying file names and not the actual file
I have a folder in Excel which contains about 500 files with different file names refering to a different client: e.g. "Proforma Bill Smith-GS010203" "proforma John Smith- CS010302" I am currently tying to set up an Excel spreadsheet and would like to copy just the file names into the spreadsheet - not the actual file. I have been trying to copy and paste, just the file titles and had no luck, as excel only wants to copy the file. In Excel you can "Copy" and "Paste Special" if you want to just copy the values, and I wondered whether you could do ...

Copy and Paste in Excel, copies cell and formula, but shows same v
Excel 2003 with 2007 converters installed. Not constant problem, but have seen it once before, can't remember how to stop it happening. I have a bank forecast which I have a running total column, against a individual line item list. Noddy stuff. Problem. If I make changes to the forecast I need to recopy down the running total formula to refresh the running total when it doesn't pick up the additions, usual when a cut has been pasted in. Whilst it allows me to dragdown or copy and paste the formula and the new cells take on the correct line/column numbers to do thei...

Copying attachments to another email gives odd results
Hi, Using Outlook 2003 SP3 using an updated Windows XP SP3 When I copy 5 attachments from one email and paste them into another, it some times pastes the same attachment for all 5 but uses the correct name. I end up with an email with 5 different names, but they're all the same file. Saving them locally then reattaching seems to prevent this and it happens in rare situations. Is this a known issue? ...

Excel Formula Copy
Why would a formula copy down the whole column but NOT provide the correct answers within the cells at one computer and at another computer would work? Jennifer schreef: > Why would a formula copy down the whole column but NOT provide the correct > answers within the cells at one computer and at another computer would work? Could you be more specific? What does it say on the other computer? Maybe in Tools > Options> Calculations "manual" is selected. Maybe the Automatic Calculation option is off on the computer it wont work on?? Thats my only guess "Jennifer&quo...

How do I disable the pop-ups that appear when I copy/paste, etc?
I just upgraded to Office 2003. Each time I copy, paste, fill down, etc., I get these little pup-up wizards. What are they actually called? How do I disable this feature? <Tools> <Options> <Edit> tab, And uncheck the options you don't wish to have displayed. -- HTH, RD ===================================================== Please keep all correspondence within the Group, so all may benefit! ===================================================== "Fiscal Al" <Fiscal Al@discussions.microsoft.com> wrote in message news:8C10E796-C820-434C-94B6-3660D549...

I need more columns
What if you need more than 256 columns? I cannot link the worksheet pages either because I am averaging the numbers 256 is the limit in Excel. You can write an average formula, though it's more work, e.g. =SUM(Sheet1!A1:A500,Sheet2!A1:A500)/COUNT(Sheet1!A1:A500,Sheet2!A1:A500) On Sat, 22 Jan 2005 09:57:04 -0800, "dilbert" <dilbert@discussions.microsoft.com> wrote: >What if you need more than 256 columns? >I cannot link the worksheet pages either because I am averaging the numbers In fact you don't need to "roll your own" average. this for...

displaying a comment only when the cell is selected #2
I'd like to insert a comment in a certain cell, so that when that cell is selected by a user, the comment is then displayed. I know this must be possible, but I haven't been able to figure it out.... I can show or hide comments in various combinations, but can't find a way to hide the comment UNTIL the cell is selected, and then display it. How do I do this please?! Thanks Hi Jeff, Try: Tools Options | View tab | select 'Comment indicator only" | OK --- Regards, Norman "Jeff" <no_em@ilplea.se> wrote in message news:JdidnecOi7ehGVbfRVnyhg@eclip...

How to have multiple columns in excel that will expand and colaps.
I have a large about of tiered data, multiple columns, that I would like for the users to be able to expand and colapse on by each column level to view that level of data. Is there a method of doing this. It's hard to understand what you are wanting from what you say. Provide some detail about what the data looks like at the start, then what it looks like after expanding and then what it looks like after collapsing. Don't attach a file to your post. Just describe what you have and want. HTH Otto "columnhelp" <columnhelp@discussions.microsoft.com> wrote in me...

Last Cell #2
I know this has been asked before but I cant find what I want on Google. I need to get the address or row number of the first empty cell in column A, either will do, I need to use VB to copy and paste data from ten sheets into one. A formula or a VB way would be great, anyway of identifying the first empty cell. This cell may be empty or contain a null string. Any help would be reaaly good. TIA Alan. to find the last row x=cells(rows.count,"a").end(xlup).row+1 to find the next empty x=cells(1,1).end(xldown).row ' or address -- Don Guillett SalesAid Software donaldb@281.com &...

duplicate cells linearly?
Hello all - Is there a way to duplicate a formula in cells were the row reference grows linearly, instead of simply the number of cells? For instance, if you have in Sheet2 the formula Sheet1!$c1 and you duplicate it into rows below, you get Sheet1!$c2 Sheet1!$c3 Sheet1!$c4 Sheet1!$c5 However, we would like to do : Sheet1!$c4 Sheet1!$c8 Sheet1!$c12 We have a spreadsheet composed of two worksheets. In the first worksheet there are cells which are summed every 72 rows. We want those summed values to appear in worksheet 2, in one row after the other. Since we have a lot of summed cells, i...

Cell Not working
I have office 2002, my windows is home xp. Last week we had to reformat my xp, got a hold of a nasty worm! I just use a chart to display numbers in series. Now when I try it from an old sheet it inserts the number as a date? I keep trying to change the cell to GENERAL, but it dosen't work. Can't understand it. When you say you keep trying to re-format the cell as General, what result do you get? If I do it on a date cell (re-format) I get the date code (i.e. the value of the date). Ex. cells has "03-01-11", select cell and re-format to General = 37632. -- Regards; Ro...

delete row if given cell = 'X'
Is there an easy way to do the above. Thanks much Carl "MSNews" <nf@no.com> wrote in message news:%23Fj6fBvPKHA.764@TK2MSFTNGP02.phx.gbl... > Is there an easy way to do the above. > > Thanks much > > Carl > I'm not an expert but use data filter to select the rows, select and delete them. Try it with a trial sheet first though! Peter Several ways 1. data>filter>autofilter>filter on the x>delete 2. a looping macro from the bottom up sub delifx() for i=cells(rows.count,"a").end(xlup).row to 2 step -1 if lcase(cells(i,&qu...

using two cells 1 with total time n 1 with date how can i put the.
I'm trying to put the amount of time spent in to a seperate sheet (Cell # 2 column E ) from a sheet that has the dates in one cell (column A) and the time spent in another (column K) and the reason for the time spent in column B. On the seperate sheet I have to put the amount of time spent in column E and match with the date I have in column A on the seperate sheet to populate the chart that I'm making. The only thing that I have been able to do is create a formula to show the amount of time spent and for what reason but i can't match it to the date because the dates ...

matching part numbers dispersed in two columns
Hello - I work with price lists in Excel. I want to match lists whos main columns are part numbers. Problem is that there are part number that do not match in between the two lists. For example, the part numbers column in one list (I'll call it "A")ma have the part numbers 72579, 72580, 72581, 72582, 72583. The par numbers column in the other list (I'll call it "B") may have 72579 72580, 72582, 72583, 72584. I want to match the numbers from list "B" to list "A". If Excel coul just line up the matching numbers on a new column (and leaving blan ...

How to swap rows and columns?
I had a heart attack last year, and my doctor told me to keep a journal of diet, exercise, etc. I'm using an Excel worksheet to do it. Each column is a day of the year, and the rows are items, like how far I walked that day, how much I ate, how much sleep, my weight, my blood pressure, etc. As I got in the habit of using it, I started adding other stuff, so now it's become an important repository of data for me. The problem is, I thought Excel had essentially unlimited rows and columns, and it turns out that it only has 256 columns, which isn't enough for a year. It has thousa...

print title page setup/sheet can not enter cell in row/column lin
On page setup in the sheet page we can not enter cells into the print titles row or columns. Also the worksheet cell query on these lines will not open. Hi Are you trying do this from Print Preview page, or File|Page Setup? I think it's only possible from the latter. -- Andy. "don r" <don r@discussions.microsoft.com> wrote in message news:26C400D7-14A0-41F8-BBE6-8DF2F5579A30@microsoft.com... > On page setup in the sheet page we can not enter cells into the print > titles > row or > columns. Also the worksheet cell query on these lines will not open. &g...

Remove 'Non Commercial Use' in Outlook title bar
QUESTION: - How to easily & quickly remove the 'non commercial use' in the title bar for a newly installed version of office professional 2007? BACKGROUND I am running Windows 7 and have the Office Professional 2007 on dvd. My new laptop was pre-installed with office 2007. I did not un-install this, I just put in my new office 2007 professional dvd and completed the installation. Everything works, however, outlook (only outlook) displays the 'non-commercial use' in the title bar. I have no entry for office 2007 in the add/remove programs. The only entry ...