• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Rearrange the data

Vignesh M

New Member
Dears,

I want to rearrange the data in the attached file. Actually the data is being copy pasted from a Word file (I am attaching the word file as for your reference).

1. If we have "Servicing Charges Adjustment" in Column A then we should cut paste the next 4 cells values to Column C.

2. If we have Negative values in Column A then we should cut paste the next 3 cell values to Column D.

Please help me by providing some idea to create any VBA macros or any TextToColumn tricks.

Thanks,
Vignesh M
 

Attachments

  • SDP SFP.xlsx
    31.2 KB · Views: 11
  • Finance Signoff Schedule Jan 2018.docx
    39.1 KB · Views: 4
Can you please markup 3 or 4 samples to show a before and after example
Because there are numbers in Column A that look like account number not values ?
 
Open your Word file and use the keyboard to select ALL the data with Ctrl+a.
Move to Excel and in a brand new sheet, select cell A1 and paste the clipboard data there.
Then run this one-line macro:
Code:
Sub blah()
Columns("E:G").SpecialCells(xlCellTypeBlanks).Offset(, -4).Insert Shift:=xlToRight
End Sub

In the attached I did exactly that on Sheet2.
On Sheet1 I have only pasted the information from Word. There's a button at cell A1 which calls the macro. Click it.
Is this what you're looking for?
 

Attachments

  • Chandoo37504.xlsm
    61.7 KB · Views: 1
Back
Top