PDA

View Full Version : Stop auto text to columns upon opening



MattehWoo
08-25-2016, 07:08 AM
Hi guys,

Is there a way of stopping excel from automatically splitting data into columns?

I have 2 types of data, the majority of which gets pasted in 1 column where my code then splits it all out into how i need, which eventually splits it via text to columns.

However the minority of data (which is manually caught) wants to split it into multiple columns when pasted into the front sheet.

I would much rather it all just go into the 1 column and allow my code to do its job.

Is there a way round this?

Cheers

SamT
08-25-2016, 08:16 AM
Is there a way of stopping excel from automatically splitting data into columns?That is not Excel,THat is your code.


Is there a way round this?Modify your code.

We need to see all the code in order to see how to modify it. Please use CODE Tags,(the # icon in the editor menu,) when pasting the code into your post.

MattehWoo
08-26-2016, 02:45 AM
I'm of the opinion that it is Excel as whenever i even copy the data into a new book it still splits it.

I think the reason for this is that the data is copied from SAP so has tabs built into it.

eg:

1 21.07.2016 01 R 7 2,854
1 22.04.2016 01 R 7 2,022
1 03.02.2016 01 03 7 1,238
1 17.12.2015 09 R 7 796
1 14.12.2015 09 CA 7 771
1 04.11.2015 01 03 7 333
1 23.07.2015 01 R 7 9,553
1 22.04.2015 01 R 7 8,813
1 27.01.2015 01 R 7 8,033
1 23.10.2014 01 R 7 7,176
1 06.08.2014 01 03 7 6,472
1 25.04.2014 01 R 7 5,715
1 22.01.2014 17 R 7 4,849
1 22.01.2014 01 R 7 4,849
1 01.11.2013 01 R 7 4,050
1 18.10.2013 09 C 7 3,932
1 25.07.2013 01 R 7 3,157
1 07.05.2013 01 R 7 2,443
1 06.02.2013 01 R 7 1,529
1 30.11.2012 02 C 7 870
1 01.11.2012 01 R 7 583
1 24.09.2012 02 R 7 235
1 19.04.2012 06 C 7 9,296


So whenever this is copied and an attempt is made to paste, it automatically splits it.

Looking into it, it appears the tab delimiter is always set to on in excel and i would rather this be automatically disabled when i open the program i have created so that when the user pastes this data in it will not split.

I hope that makes sense?

Cheers,

snb
08-26-2016, 05:41 AM
I'd say: remove the tabs first.

SamT
08-26-2016, 07:51 AM
Check this out

http://www.siddharthrout.com/2011/08/15/vba-excelallow-paste-special-only/