Forum Discussion

Jeev125's avatar
Jeev125
Copper Contributor
Aug 31, 2020

VBA Code to Assemble data horizontaly

Hi All,

 

Need help in Developing a vba code. I tried Power Query but could Pivot or Group using multiple filters.

Can somebody create a logic to compare data vertical to horizontal. I have attached my Excel for reference.

 

 

Raw Data Is the CVS Dump.

 

I want to assemble to Sample File.

 

I tried First and last event Vlookup, but i get results in different lines. Power Query i couldn't find a function which assemble like the sample data (which is the output file i need). Need help in resolving this issue. The current match up is purely done manually.

 

Filter required while setting up the raw data. 


Column F: Fault (Only include Moving Status)

Column G: Fault Type 1 (Stopped & moving) is the filter criteria.

 

 

7 Replies

    • Jeev125's avatar
      Jeev125
      Copper Contributor

      Riny_van_Eekelen 

       

      Hi Riny, i tried this solution before but my data has some notification without failure. what i am trying to match is if Date & Time-Location-System-Equipment with moving status is STOPPED then same event should come with different time but with Moving.

       

      My data is through a system generated so i have no control, I have attached Quarterly raw data wherein i have 3075 line with moving status Stopped and 3196 Moving. i want to match stop lines with moving and remove unmatched. 

       

       

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        Jeev125 Don't really know what I'm looking at. Can you explain in an example how you would match events and report them if you had to do it manually, using the data that you uploaded in your previous post?

Resources