How to "copy up" into blank cells automatically?

DjembeDog

New Member
Joined
Jul 2, 2008
Messages
25
I have merged two sets of data using a common field (Column Q).
My goal is to populate all of column R with data below the blank cells (because the data in column Q matches).

Is there a way to automatically populate any blank cells in column R with the lower data?


PQRV
1590945144521691
24521691RM4010115383
3590945144521692
44521692RM4010115349
5590945144521711
6590945144521711
7590945144521711
84521711RM4013115329
9590945144521712
104521712RM4010115342
11590945144521713
124521713RM4010115340
13590945144521714
144521714RM4010115341
15590945144521826
164521826AMR6-SAT52870

A few things to note:
- I am going for automation here because I am dealing with 324,675 rows of data (with 6 more spreadsheets of the same to go).
- I am pursuing a "copy up" solution because regardless of whether I sort column Q Largest to Smallest or Smallest to Largest, the unique data in column R is always on the bottom of the number groups in column Q.


I do hope this makes sense.
Thanks in advance for any insight!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Select column R, press F5, press Alt+ s, Press K, Press Enter, type = , press down arrow, press Ctrl + Enter.


Regards,
DILIPandey
 
Upvote 0
Try using this script:
Code:
Sub Copy_Upper()
Application.ScreenUpdating = False
Dim i As Integer
Dim Lastrow As Integer
Lastrow = Cells(Rows.Count, "R").End(xlUp).Row
For i = 2 To Lastrow
If Cells(i, 18).Value = "" Then Cells(i, 18).Value = Cells(i - 1, 18).Value
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

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