View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rahul Gupta Rahul Gupta is offline
external usenet poster
 
Posts: 21
Default Shift cells and then wrap text to fit.

Hello Peter,

Yes this is want i wanted but with a diffrence i wanted it to be done only
in one row "1" and all alternate column B, D, F etc.

I have similar problem with rows even...

Rahul.
"Peter T" wrote:

Afraid I don't quite follow, before you said you wanted to shift cells to
the right but here it looks like you want to shift all cells in col-B down
one

range("b1:b65535").Cut destination:=range("b2:b65536")

and similar with col-D

Range("B:B,D:D").Wraptext = True

I'm wondering, do also you want to do similar for every alternate column
beyond col-D?

Regards,
Peter T

and similarly in col-D
"Rahul Gupta" wrote in message
...
Hello Peter,

Thanks for the kind help but i wanted some thing else. See i want to shift
all cells in a record such that contents of A1 are not affected, B1 is
shifted to B2, Again Contents of C1 are not affected but D1 is shifted to

D2
and this continues. Data shifted in B2, D2 etc should be wrapped so as to

fit
in the cell.

Hope this makes senario more clear.

"Peter T" wrote:

Not sure what you mean by "wrap them in a record" but based on the rest

of
your question -

Manually, select col-B header, grab the selection and drag to col-D

VBA,
Columns("B:B").Cut Destination:=Columns("D:D")

This will replace the contents of col-D with col-B

Regards,
Peter T

"Rahul Gupta" wrote in message
...
Hello All,

How do i shift alternate cell one place right and then wrap them in a
record
occuping 50000 lines. i mean i want to shift B1, then D1 and in B2 and

D2
respectively and continie this utill all records are shifted.