MS Excel question re: formatting output

Say I had some fixed values in the following cells:

4 8 3
2 1 7

and I wanted to change all the cells so that they would look like this:

4, 8, 3,
2, 1, 7,

How would I go about making this change? TIA.

Replace all spaces with ,space or am I missing something?

Let me attempt to redraw it:


|4|8|3|
|2|1|7|

to


|4,|8,|3,|
|2,|1,|7,|

You can just type in the , but you would lose the mathmatical features of the cells if you wanted to add them together or something of that nature.

The mathematical functions are not required for these values. Also, I need to type in cells that span 76x33 so it’s an awful lot of commas.

In your example (data in cells A1 through C2), just put the following equation in cell D1:

=A1&","

Now copy that cell to D1 through F2, and just print columns D through F.

And, if you now want to replace the contents of columns A through C, mark and copy the new stuff in D through F, put your cursor on cell A1, and do a “paste special…” and choose “values” (if you just do a regular paste, you’ll get reference problems).

Well damn, I’ve been using Excel for 10 years and I never knew this. I’ve always pasted stuff into notepad and then back into Excel. Thanks!

You’re welcome, jjimm! It always pays to spend some time exploring some of the more obscure menu choices; there are all sorts of goodies buried down there! I use “paste values” so often, I’ve put the icon for it on my toolbar (View, Toolbars, Customize, Commands tab, choose Edit, find the icon, which looks like a clipboard with “12” written on it, and drag it up to the toolbar someplace).

Or, if you just want to change the appearance, do this:[ul][li]Highlight the cells in question.[/li][li]Right click, Format Cells.[/li][li]On the Number tab, select Custom.[/li][li]In the Type box, enter #",". Vary the number of #s according to the number of digits you want, and don’t forget the quotes around the comma—otherwise Excel will consider it a thousands separator.[/li][li]OK.[/li][/ul]

Thanks guys!

Hey Otto, I noticed that when I used the #"," type, it worked for all the non-zero values but only put a comma where the 0 cells used to be. Just letting ya know.

Your sample didn’t include any zero values. Try 0"," (or #0",") instead.