View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default need a macro to copy the data to the following cells

example

A B C D

1 SIZE1
2 ITEM1
3 ITEM2
4 SIZE2
5 ITEM3
6 SIZE3
7 ITEM4
8 ITEM5
9 ITEM6


In the above example a2, a3,a5 etc are empty becuase A2, A3 will be the same
size mentioned in A1. A5 will be the same in A4. So I need copy the value
from A1 to a2,a3 , simillary the value from A4 to A5, value from A6 to
A7,A8,A9. In short I have to copy from top cell value to the next cell if it
is blank.

With thanks
Pol
"Joel" wrote:

You need to have a macro to perform this task. I writine dprograms like this
before but I need more information from you to get it correct.

1) Are you groups always 3 rows or is there a different criteria that you
use to seperate the groups of rows?

2) Are you combining the data into 1 cell or are you putting data in column B.

3) You said there was empty cells but your data didn't show any empty cells.
Can you post an example showing the empty cells as well as data with
different number of rows per group.

"pol" wrote:

Please help with a macros to copy the data to acitve cell from the cell just
before the activce cell ( Only if the active cell is not null ). for example

type name
1 XX
2 xx1
3 xx2
4 YY
5 yy1
6 yy2

In the above example I want to copy XX from A1 cell to range a2..a3,
YY from A4 to copy to a4...a6. So I need to write the macro to copy
conditionally if the active cell is not null . The out put should come
type name
1 XX
2 XX xx1
3 XX xx2
4 YY
5 YY yy1
6 YY yy2
Please help

With thanks
Pol