Data Reshuffling of Cells
Solved/Closed
Related:
- Data Reshuffling of Cells
- Tmobile data check - Guide
- Transfer data from one excel worksheet to another automatically - Guide
- Data transmission cable - Guide
- Digital data transmission - Guide
- Gta 5 data download for pc - Download - Action and adventure
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
552
Oct 25, 2011 at 09:34 AM
Oct 25, 2011 at 09:34 AM
Hi Aslam,
Try this code:
Best regards,
Trowa
Try this code:
Sub test() Dim lRow As Integer 'Change Q to column letter with data in the last row. lRow = Range("Q" & Rows.Count).End(xlUp).Row For Each cell In Range("Q5:Q" & lRow) If cell.Value <> "" _ Or cell.Offset(0, 1).Value <> "" _ Or cell.Offset(0, 2).Value <> "" _ Or cell.Offset(0, 3).Value <> "" _ Or cell.Offset(0, 4).Value <> "" Then cell.Offset(0, -12).Cut Destination:=cell.Offset(0, -11) cell.Offset(0, -7).Cut Destination:=cell.Offset(0, -9) cell.Offset(0, -5).Cut Destination:=cell.Offset(0, -7) cell.Offset(0, -7).Copy Destination:=cell.Offset(0, -10) cell.Offset(0, -4).Cut Destination:=cell.Offset(0, 6) cell.Offset(0, -3).Cut Destination:=cell.Offset(0, 7) cell.Offset(0, -2).Cut Destination:=cell.Offset(0, -6) cell.Offset(0, -1).Cut Destination:=cell.Offset(0, -5) cell.Copy Destination:=cell.Offset(0, -2) cell.Offset(0, 1).Cut Destination:=cell.Offset(0, -3) cell.Offset(0, 4).Cut Destination:=cell.Offset(0, -1) cell.ClearContents End If Next End Sub
Best regards,
Trowa
Oct 25, 2011 at 02:26 PM
Thank you very much for your time and attention which you extended to help me.
I am sorry to let you know that this macro is not working as per requirement. Its reshuffle the data but not as per desire.
could you please let me know what no. you assigned to represent the column, if you will let me know this may be I will change data reshuffling according to my requirement.
Or please check this macro once again after study the task once again.
I really appreciate your efforts and I am very much confident that you will do it.
Best regards,
Aslam
Oct 25, 2011 at 04:04 PM
I have solved the problem and now its working according to my requirement. You set Q as 0 while I changed it and set U as 0 then adjusted all the columns and its working good.
Thank you very much for your support and help.
Best regards,
Aslam