Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-2825127%22%20slang%3D%22en-US%22%3EExcel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2825127%22%20slang%3D%22en-US%22%3E%3CP%3EOur%20online%20ticketing%20service%20downloads%20reports%20in%20Excel%20but%20Excel%20is%20changing%20the%20seating%20numbers%20to%20dates.%20For%20example%20Table%204%20Seat%201%20become%201%20April.%20How%20do%20I%20prevent%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2825127%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2825401%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2825401%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1179253%22%20target%3D%22_blank%22%3E%40GregRTicketMan%3C%2FA%3E%26nbsp%3BHow%20are%20you%20downloading%2Fimporting%3F%20Important%20to%20indicate%20that%20the%20seating%20part%20of%20the%20data%20should%20be%20treated%20as%20%3CSTRONG%3Etext%3C%2FSTRONG%3E.%20Otherwise%2C%20Excel%20will%20try%20to%20be%20smart%20by%20assuming%20that%20you%20are%20importing%20dates%2C%20provided%20that%20it%20can%20create%20a%20date%20from%20that%20text%20string.%20This%20is%2C%20depending%20on%20your%20local%20system%20settings%2C%20%26nbsp%3B4-1%20or%204%2F1%20may%20become%20April%201%20(US%20style)%20or%201%20January%20(European%20style).%20But%2014-3%20or%2014%2F3%20will%20remain%2014-3%20(or%2014%2F3)%20in%20text%20on%20a%20US%20system%2C%20but%20it%20will%20change%20to%2014%20March%20on%20a%20European%20system.%20Being%20on%20a%20European%20style%20date%20system%20myself%2C%20I%20played%20around%20with%20this%20a%20bit.%20When%20I%20import%203%2F14%20it%20becomes%201%20March%202014.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20are%20importing%20with%20PowerQuery%20you%20need%20to%20check%20the%20Data%20Type%20step(s).%20If%20you%20use%20the%20legacy%20Text%20import%20option%20(or%20Text%20to%20columns)%2C%20make%20sure%20to%20set%20the%20table%20seating%20column%20to%20type%20Text.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2825411%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2825411%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1179253%22%20target%3D%22_blank%22%3E%40GregRTicketMan%3C%2FA%3E%26nbsp%3BHi.%20Three%20approches%20for%20different%20situations%3B%3C%2FP%3E%3CP%3EWith%20following%20lines%20in%20a%20text%20file%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E4-222%0A4-223%0A4-1%0A4-02%0A4-34%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E1.%20Opening%20it%20with%20Excel%20you%20could%20format%20the%20data%20as%20Text%20in%20step%20three%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bosinander_0-1633668434514.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316125iFD22A656C06E5B54%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bosinander_0-1633668434514.png%22%20alt%3D%22bosinander_0-1633668434514.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20cell%20contains%20text%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bosinander_2-1633668554230.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316127i0EAB2F1CDEEE9A2D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bosinander_2-1633668554230.png%22%20alt%3D%22bosinander_2-1633668554230.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20If%20you%20have%20already%20imported%20the%20data%20and%20it%20is%20enough%20that%20it%20looks%20correct%2C%20you%20could%20change%20the%20format%20from%20default%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bosinander_3-1633668760587.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316128i18FC0DF217E1A5E2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bosinander_3-1633668760587.png%22%20alt%3D%22bosinander_3-1633668760587.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eto%20type%3A%20M-D%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bosinander_4-1633668835089.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316129i505C2EB95F6326DF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bosinander_4-1633668835089.png%22%20alt%3D%22bosinander_4-1633668835089.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eto%20get%20the%20wanted%20look%20even%20though%20Excel%20has%20interpreted%20the%20data%20as%20a%20date.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bosinander_5-1633668910978.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316130i91FC2130FD322443%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bosinander_5-1633668910978.png%22%20alt%3D%22bosinander_5-1633668910978.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EFinally%2C%20align%20the%20column%20to%20left%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bosinander_6-1633668991651.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316131iF43910997B8E0751%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bosinander_6-1633668991651.png%22%20alt%3D%22bosinander_6-1633668991651.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E3.%20You%20may%20also%20use%20a%20helper%20column%3B%3C%2FP%3E%3CP%3E%3DTEXT(%40A%3AA%3B%22M-D%22)%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Our online ticketing service downloads reports in Excel but Excel is changing the seating numbers to dates. For example Table 4 Seat 1 become 1 April. How do I prevent that?

5 Replies

@GregRTicketMan How are you downloading/importing? Important to indicate that the seating part of the data should be treated as text. Otherwise, Excel will try to be smart by assuming that you are importing dates, provided that it can create a date from that text string. This is, depending on your local system settings,  4-1 or 4/1 may become April 1 (US style) or 1 January (European style). But 14-3 or 14/3 will remain 14-3 (or 14/3) in text on a US system, but it will change to 14 March on a European system. Being on a European style date system myself, I played around with this a bit. When I import 3/14 it becomes 1 March 2014.

 

If you are importing with PowerQuery you need to check the Data Type step(s). If you use the legacy Text import option (or Text to columns), make sure to set the table seating column to type Text.

@GregRTicketMan Hi. Three approches for different situations;

With following lines in a text file

4-222
4-223
4-1
4-02
4-34

1. Opening it with Excel you could format the data as Text in step three

bosinander_0-1633668434514.png

The cell contains text

bosinander_2-1633668554230.png

 

2. If you have already imported the data and it is enough that it looks correct, you could change the format from default

bosinander_3-1633668760587.png

 

to type: M-D

bosinander_4-1633668835089.png

to get the wanted look even though Excel has interpreted the data as a date.

bosinander_5-1633668910978.png

Finally, align the column to left

bosinander_6-1633668991651.png

3. You may also use a helper column;

=TEXT(@A:A;"M-D") 

@Riny_van_EekelenThank you very much for the advice. I appreciate it.

This was helpful and I used your advice to make it easier to change the format from a date to what I needed which was a table # and a seat #. I wish there was some way to override Excel so it didn't assume it knew what I wanted in those cells and would just accept what I put in.
Yes, in some cases, it looks like a neat possibility to disable default format assumptions.
I've been there before and thus just had to recall.
Glad to help