I have a column in Excel which gets data from another column, in another spreadsheet. How do I add an empty row after every cell?

StackOverflow https://stackoverflow.com/questions/22766792

  •  24-06-2023
  •  | 
  •  

Question

As the title suggests, I have a column in my first worksheet which gets its data from another column, in a second spreadsheet.

I have linked them using ='Data'!B1

Of course, if I drag the handle down, I get all the remaining data from the linked column, but I would like to have an empty row after each cell.

Like so: B1 has data, B2 is blank, B3 has data, B4 is blank, etc.

If some kind person out there could help me out, I would appreciate it very much. I have tried macros and looked this up in forums but can't seem to make this work with Data --> Sort.

Thank you! :)

Was it helpful?

Solution

Given what you're asking for, the way I would do it would be using the Offset or Indirect function so I can control which cells to pull in from the other sheet.

Given your example, in Sheet1, I would have:

B1: =OFFSET(Sheet2!$B$1,(ROW(B1)-1)/2,0)
B2: <blank>
B3: =OFFSET(Sheet2!$B$1,(ROW(B3)-1)/2,0)
B4: <blank>

You can drag this down and it will give you alternating formula / blanks and pull the consecutive row from the other sheet.

As a quick explation, the function will always look at cell B1 in your second sheet and offset it by (Row()-1)/2 rows... So, in row 1, it would offset it by (1-1)/2 = 0 rows, in row 3, it would offset it by (3-1)/2 = 1 rows, etc.

Hope this makes sense and does the trick!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top