Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'd like to copy values from a column down till a new value is encountered and then start copying that down. Simple I'm sure but I can't seen to get a start on it. Here's what I have: Column A Column B Value 1 Number Number Number Value 2 Number Number Here's what I'd like after running macro: Column A Column B Value 1 Number Value 1 Number Value 1 Number Value 2 Number Value 2 Number Thanks for the help. |
#2
![]()
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve,
Here's a method that uses a helper column (which can later be deleted) Insert a blank column next to B (ie column C is blank) In C1: = A1 In C2: = IF(A2="",C1,A2) Copy C2 down for all of your data Select Column C and Copy it Paste Special (Values) into column A Delete column C Dan E "Steve" wrote in message ... Hi, I'd like to copy values from a column down till a new value is encountered and then start copying that down. Simple I'm sure but I can't seen to get a start on it. Here's what I have: Column A Column B Value 1 Number Number Number Value 2 Number Number Here's what I'd like after running macro: Column A Column B Value 1 Number Value 1 Number Value 1 Number Value 2 Number Value 2 Number Thanks for the help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I understand you, this should work. Select the range
you want to fill and run the macro. ***Make sure you do a back up first Sub copyit() Dim t As Integer, i As Integer Dim rng As Range Set rng = Selection t = rng.Rows.Count For i = 2 To t If rng.Cells(i, 1) = "" Then rng.Cells(i, 1) = rng.Cells(i - 1, 1) End If Next i End Sub -----Original Message----- Hi, I'd like to copy values from a column down till a new value is encountered and then start copying that down. Simple I'm sure but I can't seen to get a start on it. Here's what I have: Column A Column B Value 1 Number Number Number Value 2 Number Number Here's what I'd like after running macro: Column A Column B Value 1 Number Value 1 Number Value 1 Number Value 2 Number Value 2 Number Thanks for the help. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying rows values on one sheet to part of a formula in a column | Excel Discussion (Misc queries) | |||
Copying cells from varying rows | Excel Discussion (Misc queries) | |||
Alternating shading of varying groups of rows | Excel Discussion (Misc queries) | |||
SUMPRODUCT with varying # of rows | Excel Worksheet Functions | |||
How do I ignore values while copying from hidden rows? | Excel Worksheet Functions |