PC Review


Reply
Thread Tools Rate Thread

Copy Values to empty cell below filled cells in selection

 
 
Harn88
Guest
Posts: n/a
 
      3rd Aug 2009
Hello

Please help me. I need a macro that will copy values to empty cell below
filled cells in selection.

Before After
110.03 3.23 110.03 3.23
116.01 116.01 3.23
125.02 125.02 3.23
155.01 155.01 3.23
155.05 155.05 3.23
155.06 155.06 3.23
167.01 167.01 3.23
169.01 169.01 3.23
176.01 176.01 3.23
181.01 181.01 3.23
181.02 181.02 3.23
182.01 182.01 3.23
184.01 184.01 3.23
116.01 4.2 116.01 4.2
125.02 125.02 4.2
135.03 135.03 4.2
155.01 155.01 4.2
155.05 155.05 4.2
155.06 155.06 4.2
162.01 162.01 4.2
169.01 169.01 4.2
176.01 176.01 4.2
176.02 176.02 4.2
181.01 181.01 4.2
100.01 5.24 100.01 5.24
116.01 116.01 5.24
116.02 116.02 5.24
125.02 125.02 5.24
147.01 147.01 5.24
155.01 155.01 5.24
155.04 155.04 5.24
155.05 155.05 5.24
155.06 155.06 5.24
162.01 162.01 5.24
167.01 167.01 5.24
169.01 169.01 5.24
176.01 176.01 5.24

Thank you very much

Best regards,

Harn

 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      3rd Aug 2009
Let's say values in ColumnC are filled in and you want to fill in values in
ColumnD:
Sub FillEmpties()
Dim lastrow As Long
lastrow = ActiveSheet.Cells(Rows.Count, "C").End(xlUp).Row
Range("D2" & lastrow).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub

Also:
http://www.contextures.com/xlDataEntry02.html

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Harn88" wrote:

> Hello
>
> Please help me. I need a macro that will copy values to empty cell below
> filled cells in selection.
>
> Before After
> 110.03 3.23 110.03 3.23
> 116.01 116.01 3.23
> 125.02 125.02 3.23
> 155.01 155.01 3.23
> 155.05 155.05 3.23
> 155.06 155.06 3.23
> 167.01 167.01 3.23
> 169.01 169.01 3.23
> 176.01 176.01 3.23
> 181.01 181.01 3.23
> 181.02 181.02 3.23
> 182.01 182.01 3.23
> 184.01 184.01 3.23
> 116.01 4.2 116.01 4.2
> 125.02 125.02 4.2
> 135.03 135.03 4.2
> 155.01 155.01 4.2
> 155.05 155.05 4.2
> 155.06 155.06 4.2
> 162.01 162.01 4.2
> 169.01 169.01 4.2
> 176.01 176.01 4.2
> 176.02 176.02 4.2
> 181.01 181.01 4.2
> 100.01 5.24 100.01 5.24
> 116.01 116.01 5.24
> 116.02 116.02 5.24
> 125.02 125.02 5.24
> 147.01 147.01 5.24
> 155.01 155.01 5.24
> 155.04 155.04 5.24
> 155.05 155.05 5.24
> 155.06 155.06 5.24
> 162.01 162.01 5.24
> 167.01 167.01 5.24
> 169.01 169.01 5.24
> 176.01 176.01 5.24
>
> Thank you very much
>
> Best regards,
>
> Harn
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Request: Fill in empty cells with previous Filled cell in column Artis Microsoft Excel Worksheet Functions 2 25th Jun 2007 08:30 PM
Copy Data From Filled to Empty Cells =?Utf-8?B?U2hlaWtoIFNhYWRp?= Microsoft Excel Misc 0 10th Nov 2005 07:21 PM
Re: VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? Steven Rosenberg Microsoft Excel Programming 0 5th Aug 2003 06:10 AM
SOS VBA Code Emergency: need to copy tell to empty cell direct below where values in adjacent cells in different column are equal to each other. Steven Rosenberg Microsoft Excel Programming 4 5th Aug 2003 05:05 AM
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? SROSENYC Microsoft Excel Programming 1 5th Aug 2003 04:34 AM


Features
 

Advertising
 

Newsgroups
 


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