cut and paste using absolute references in vba

S

Stewart

A B C D
1 start time

2 5 2 X

3 3 4 Y

3 6 3 Z


The cursor is at D2.
What is the code to cut and paste values in
column C - X to I2:J2, Y to G3:J3 and Z to J4:J6?
Hope this is understandable.
 
T

Tom Ogilvy

Sub BuiltData()
for each cell in Range("C2:C4")
cell.Offset(0,cell.offset(0,-2).Value+1). _
Resize(1,cell.offset(0,-1).Value).Value =
cell.Value
cell.ClearContents
Next
End Sub

Assume

Z to J4:J6
should say
Z to J4:K4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top