Macro to copy and paste in next blank cell

dan3721

New Member
Joined
Dec 23, 2009
Messages
18
Hi

I am looking for a macro that will copy what ever is in cell C3 in to the next blank cell into column C from C20 downwards?

What i want is a list to be compiled of the differnt values entered into cell C3. Obviously the macro is run inbetween values changing.

Any help would be much appreciated.

Thanks

Dan
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

Code:
Sub test()
Dim LR As Long
LR = WorksheetFunction.Max(20, Range("C" & Rows.Count).End(xlUp).Row + 1)
Range("C3").Copy Destination:=Range("C" & LR)
End Sub
 

Shoaibb

New Member
Joined
Jun 26, 2014
Messages
4
Thanks for reply

Yeah I have tried this. I changed Range("C3") with selection.copy

but every time I have to copy three columns and run the macro.

Is there any other way to select the next three columns automatically. Means I do not want to select every time I run the macro.

Thanks again
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650

ADVERTISEMENT

Do you mean something like

Code:
Sub test()
Dim LR As Long
LR = WorksheetFunction.Max(20, Range("C" & Rows.Count).End(xlUp).Row + 1)
Range("C3").Resize(, 3).Copy Destination:=Range("C" & LR)
End Sub
 

Shoaibb

New Member
Joined
Jun 26, 2014
Messages
4
#VoG

Sorry It was not my post. My post is

"""Hi there,

I was writing a macro but need your help. I have hundred sets of three columns consisting 21 rows. I need to write a macro that can copy three columns one by one and paste them below first set of three columns. so that all hundred sets will be one set of three columns.
I have 12 worksheets in one workbook to do this. and then I need to combine all 12 worksheets in one. here 12 are the months of year.
I hope, I have explained my problem.

Thanks""

Please guide me how to do it.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,368
Messages
5,528,280
Members
409,814
Latest member
Leon_Al

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top