Transposing data, loses date order

Godders199

Active Member
Joined
Mar 2, 2017
Messages
313
Office Version
  1. 2013
Hello, i have a report of 50 plus columns which i use, I have set up to transpose the information i require into a new worksheet, sample of code is below. my question is the data on the main report comes in date order ( submission date) no filtering or sorting has been done, however when i transpose the data i require , the date order is lost. I have spot checked random rows and all the data has transposed correctly, just not in date order.

Is it purely how excel runs the code or is there something i need to do to keep the date order?


QAgentcode = Sheets("info").Range("z11")
Qadvtype = Sheets("info").Range("z10")
QKRN = Sheets("info").Range("z12")
Qsubmissiondate = Sheets("info").Range("z13")

Sheets("submissions").Select
r = 2
t = 2

Do Until Range("A" & r).Value = ""
If Sheets("submissions").Range(Qadvtype & r).Value = "OTHER" Or Sheets("submissions").Range(QRiskRule1 & r).Value = "PIMs Review" Then
Else
If Sheets("submissions").Range(Qallocatedto & r).Value = "" Or Sheets("submissions").Range(Qallocatedto & r).Value = "" <> "" Then

Sheets("Adviser data").Range("A" & t).Value = Sheets("submissions").Range(QAgentcode & r).Value 'Adviser code
Sheets("Adviser data").Range("b" & t).Value = Sheets("submissions").Range(Qadvtype & r).Value 'Adviser type'
Sheets("Adviser data").Range("c" & t).Value = Sheets("submissions").Range(QKRN & r).Value 'KRN'
Sheets("Adviser data").Range("d" & t).Value = Sheets("submissions").Range(Qsubmissiondate & r).Value 'submission date'

t = t + 1
Else
End If
End If
r = r + 1
Loop
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,992
Messages
6,175,825
Members
452,672
Latest member
missbanana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top