Copying data

601488

New Member
Joined
Jan 12, 2007
Messages
20
Help - please! Below is an example of a simple spreadsheet I've got. The numbers on the left represent row numbers. The six digit numbers represent our internal item numbers.

I want to be able to copy 101500 into rows 2 & 3, copy 106250 into rows 5, 6 & 7, and copy 107254 into row 10. The actual list is very long so I don't want to spend time copying and pasting.

I think there may be a way of doing this using CtrlG - special - and highlighting blanks but I'm not sure.

Any ideas please.

1 101500
2
3
4 106250
5
6
7
8 107000
9 107254
10
11 111254

Thank you
Jon
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Select the column of numbers.

Press F5, click Special, tick Blanks, click OK.

Press =

Press Up arrow

Hold down CTRL and press Enter.
 
Upvote 0
Hi Jon

1. Select your column
2. Hit F5 and then the Special button. On the Goto dialog select Blanks then OK
3. Type = and press the up cursor key and confirm with Ctrl+Enter
4. Copy and pastespecial values over the column to fix the formulas just created
 
Upvote 0
Adjust upper value.
Code:
Sub G()

    Dim i As Long, v As Variant
    
    For i = 1 To 11
        If Not IsEmpty(Cells(i, "A")) Then
            v = Cells(i, "A")
        Else
            Cells(i, "A") = v
        End If
    Next

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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