Converting data from one tab to another

RandyD123

Active Member
Joined
Dec 4, 2013
Messages
296
Office Version
  1. 2016
Platform
  1. Windows
I know this is a big "ask", but I need some help. What I need to happen is all the data on the "raw data" sheet needs to be converted to the format on the "converted data" tab.


I can of course do this manually but I was looking to do this with a macro and run it from a button on the "raw data" tab.


This is what will happen:
1. Airline Name and Flight Number will convert to combine both of those columns and the result will be like shown on the "converted data" tab.
2. Equipment Name column will not be needed on the "converted data" tab.
3. The ETD time column will have to convert to just a number/text format.
4. The Day Of Week column will have to sort to the format shown on the "converted data" tab.
5. The conversion must produce the end result to be exactly as shown on the "converted data" tab, or at least as close as possible. Notice that all the info is sorted by day then by airline and then by time.


Any help would be much appreceiated. Thank you.....


https://1drv.ms/x/s!Ai35lp1419xzo4R8dmsgD0gET7HAsA
 
I think you may have misread that...."RESULTS" of the conversion, not "rest" of the conversion!!! SEE POST #9
 
Last edited:
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
So i have found a workaround for the naming of the airlines properly, not the best workaround but it works. But post #6 are the 2 concerns if solvable that would be awesome. Thanks for all the help so far!!!
 
Upvote 0
Does the output need to be sorted alphabetically by airline code or is there some other sort order?
 
Upvote 0
The sort order should be by Airline then by time. So AA would come first with all the flights listed by time, earliest first. See below. Also in the file that I uploaded there is an example of the layout on the "converted data11" tab.

[TABLE="width: 210"]
<tbody>[TR]
[TD]AA1729[/TD]
[TD]PHL[/TD]
[TD]600[/TD]
[TD]99[/TD]
[/TR]
[TR]
[TD]AA4405[/TD]
[TD]DCA[/TD]
[TD]610[/TD]
[TD]80[/TD]
[/TR]
[TR]
[TD]AA5474[/TD]
[TD]CLT[/TD]
[TD]615[/TD]
[TD]79[/TD]
[/TR]
[TR]
[TD]AA3294[/TD]
[TD]ORD[/TD]
[TD]720[/TD]
[TD]67[/TD]
[/TR]
[TR]
[TD]AA4825[/TD]
[TD]PHL[/TD]
[TD]803[/TD]
[TD]50[/TD]
[/TR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]
[TD]MDW[/TD]
[TD]605[/TD]
[TD]143[/TD]
[/TR]
[TR]
[TD]SW4104[/TD]
[TD]BWI[/TD]
[TD]610[/TD]
[TD]143[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
In this version of the file: https://1drv.ms/x/s!Ai35lp1419xzo4UDEX6nexi5KPJGYg you can see my workaround for renaming the airlines. Also notice the the "desired output" tab. When the script is run it creates a new tab called "sheet1". At this point it's only the sort order that needs a bit of tweaking. Not sure if there is a cleaner way to rename the airlines so they get renamed AA, DL, SW, UA.... Again, thank you for all the help on this one!!!
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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