LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Copy cell contents using Input Box

I need to copy down the contents of a cell the number of cells specified in
an Input Box. I first need to find the last used cell in the column as the
data will keep apending each month. LastRow equals the number in the Input
Box and I can combine that with the Column letter, but I'm having a problem
getting the last used cell address. So if the last cell in the column is M79,
I want to copy the contents down the number of cells in the Input Box. I
hope I've explained this well enough; don't laugh too hard, I'm not very good
at this. Any help would be greatly appreciated as always.

Dim LastRow As Long
Dim FirstRow As Range
Range("M65536").End(xlUp)(1).Select
LastRow = Application.InputBox("How many categories?")
FirstRow = ActiveCell

With Worksheets("Margin %")
.Range("FirstRow:M" & LastRow).FillDown
End With
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pausing a macro to input cell contents blipityblap New Users to Excel 3 January 13th 09 11:01 PM
macro with input msg based on cell contents Janelle S[_2_] Excel Discussion (Misc queries) 2 February 9th 08 11:47 PM
Displaying cell contents based on input? Fleone Excel Programming 7 February 2nd 05 12:09 AM
Making Contents of a cell input for a Module anyuan Excel Programming 0 June 28th 04 06:49 AM
How to display contents of a cell in UserForm and take input ssexcel[_3_] Excel Programming 2 October 28th 03 12:37 AM


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"