View Single Post
  #3   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

If the excel have 4000 or 5000 record it is not easy to do this by a user .
In the following example given , the unused cell is is A2..A3 and A5 .. A6
In a2.. a3 I have to copy XX and A5.. A6 I have to copy YY. So I think that
is not a solution for giving the equation ( =A1) from unused cell (a2) . The
copy and paste of this formula will not be wroked out.

With thanks for the reply.

Pol



"Jacob Skaria" wrote:

To do this you dont need a macro...

--Select a unused cell say E2
--Enter the formula in cell E2 which references the top cell (=E1)
--Copy the cell
--Keeping the copy select the data range in ColA (say A1:A100).
--Press F5. From Goto window select blanks
--This will select all blanks.. Now Right clickPasteSpecialFormulas. will
fill in with the data you need..
--Once done you can select col A Copy PasteSpecialValues to turn
formulas to actual values


PS: Post back if you still would prefer a macro

If this post helps click Yes
---------------
Jacob Skaria


"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