MetaChat is an informal place for MeFites to touch base and post, discuss and
chatter about topics that may not belong on MetaFilter. Questions? Check the FAQ. Please note: This is important.
03 October 2006
Excel Help Time! I have a file of rows and rows of numbers. I need two blank rows between each row of text. Anyway to do this other than manually?
Hmm, I don't know if this would be the quickest way, but I'd do it this way:
In a new sheet, I'm make Column a
A
1 =Sheet1, A1
2
3
4 =Sheet1, A2
5
6
7 =Sheet1, A3
(the terminology isn't right, but I'd just tab over to the first sheet and hilight the cell I wanted). Then highlight that new column and drag down to make sure it propogates right (you might have to only highlight rows 2-7) - there should now be (# of rows)*3-2, or something like that. Then, I'd highlight that whole column and drag it all the way across until I've propogated the same number of columns as the original.
I'm useless at Excel. What I would do is export the file as a .CSV and then import it into Access. Write a query to insert a bunch of blank records and then export the new table to .CSV which could then be brought into Excel.
You can do the blank lines in the .CSV in any text editor too.
Ditto the export to csv, process in a real programming language, re-import. Let me know if you still need something for this later in the week Pinks and I'll write up some Python for ya!
In my ongoing war against macros, I've managed to do this using only excel functions. Here's the sample. I'd use the formulas to build the new spaced-out list, then highlight the entire tab, copy, then Edit->Paste Special->paste as values, so you end up with the values rather than the formulas linked to another tab.
Inspired by mullac's solution, here's another sneaky way of doing it:
- Your list is in A1 and goes down
- Put
=IF(MOD(ROW()-1,3)=0,OFFSET($A$1,(ROW()-1)/3,0),"") in B1
- Fill down (normally) as far as you need
- Copy & paste values