Find the next row containing data

lac87

New Member
Joined
Mar 16, 2018
Messages
11
Hi,

I have a 'draft timetable' sheet like this:
HarryTrumpetWednesday10:30
Wednesday11:00
JackieSaxophoneWednesday11:30
BobFluteWednesday12noon
JillTrumpetThursday10:30

<tbody>
</tbody>

And 'final timetable' sheet that I want to look like this (no empty cells):
HarryTrumpetWednesday10:30
JackieSaxophoneWednesday11:30
BobFluteWednesday12noon
JillTrumpetThursday10:30

<tbody>
</tbody>

The 'draft' sheet has about 150 rows and the empty rows are random.

Is there a formula I can use in the 'final' sheet that looks for the first row containing data in the 'draft' sheet and uses that in row 1, then looks for the next row containing data in 'draft' and uses that in row 2, etc. Not necessarily copying the entire row - I'm happy to use a separate formula in each column.

Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Welcome to the Board!

It looks as if you should be able to do this fairly easily using Advanced Filters, to Filter your data based on column A not being blank, and pasting the results to the new sheet.
 
Upvote 0
Welcome to the Board!

It looks as if you should be able to do this fairly easily using Advanced Filters, to Filter your data based on column A not being blank, and pasting the results to the new sheet.

Thanks.
Yep, that's how I do it at the moment. Thought there might be a way for it to happen automatically.
 
Upvote 0
Formula based, it can be done like this:

Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
1​
HarryTrumpetWednesday
10:30
4
1​
HarryTrumpetWednesday
0.4375​
2​
Wednesday
11:00
3​
JackieSaxophoneWednesday
0.479166667​
3​
JackieSaxophoneWednesday
11:30
4​
BobFluteWednesday12noon
4​
BobFluteWednesday12noon
6​
JillTrumpetThursday
0.4375​
5​
6​
JillTrumpetThursday
10:30

In F1 just enter:

=COUNTIFS(A1:A6,"?*")

In G1 control+shift+enter, not just enter, and copy down:

=IF(ROWS($G$1:G1)>$F$1,"",SMALL(IF(1-($A$1:$A$6=""),ROW($A$1:$A$6)-ROW($A$1)+1),ROWS($G$1:G1)))

In H1 just enter, copy across, and down:

=IF($G1="","",IF(COLUMNS($G1:G1)>COLUMNS($A$1:$D$6),"",INDEX($A$1:$D$6,$G1,COLUMNS($G1:G1))))
 
Upvote 0

Forum statistics

Threads
1,216,064
Messages
6,128,562
Members
449,458
Latest member
gillmit

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