Find the next non empty cell in a column and copy specific cells across worksheets

spill-the-beans

Board Regular
Joined
Feb 7, 2013
Messages
52
Hi :)

My workbook has 2 sheets - one named Data, one named Results.

What I need to happen is, excel should look in column J in the Data worksheet. When it finds the next non empty cell, it should copy across the row values for columns J to AG of the Data worksheet into columns A to X of the Results worksheet.

The Results copied rows should be one below the other, but in the Data, the rows to copy are spaced out. The information in A:I of Data should not be copied across to Results.

So..

Data worksheet

A:IJ:AG
1unneeded informationneeded data set1
2unneeded information
3unneeded information
4unneeded informationneeded data set 2

<tbody>
</tbody>

Results worksheet

A:X
1needed data set 1
2needed data set 2

<tbody>
</tbody>

Help would be very much appreciated!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Do you have headings in row 1 of the Data worksheet? If so you can AutoFilter column J for NonBlanks and copy the visible rows to the Results worksheet.
 
Upvote 0
Yes, that works, but I only need the cells in the row that have information in, rather than copying across blank cells. For example, the cell in Data column Q is deliberately left empty, because the cell in Results column Q has a formula in it.

If I manually copy, I copy across the Data blank cell over the Results formula. This is why I think I need a formula or script to only copy across cells that have values in.
 
Upvote 0
You said:

What I need to happen is, excel should look in column J in the Data worksheet. When it finds the next non empty cell, it should copy across the row values for columns J to AG of the Data worksheet into columns A to X of the Results worksheet.

There's no mention of column Q there.
 
Upvote 0
You're right, I didn't mention it. I was trying not to complicate the question too much. By "row values" I meant that on that row, the cells with values in them should be copied over.
 
Upvote 0

Forum statistics

Threads
1,215,381
Messages
6,124,615
Members
449,175
Latest member
Anniewonder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top