How can a column be set to display multiple spaces and tabs white space in a cell

0 votes

My Excel spreadsheet has a column with data that has tabs and spaces in it (screenshot below). However, because Excel does not show the tabs and spaces, the data lacks visual organisation. However, Excel appears to switch to a "preview mode" for the cell when I double-click on it and does show the tabs and spaces (screenshot below).

Is there a method to instruct Excel to automatically show the data with tabs and spaces (without requiring a double-click on a cell)?

Default view:

enter image description here

View if I double-click on this same cell (tabs and spaces are displayed by Excel, like I need by default):

enter image description here

Jan 19, 2023 in Others by Kithuzzz
• 38,000 points
462 views

1 answer to this question.

0 votes

By entering your "code" in Word and then pasting it over, I was able to roughly duplicate your problem. The indentation no longer exists even if the cell is formatted as "Text." Since the data you are copying across is not plain text, I am not aware of a technique to stop Excel from doing this.

You have two alternatives here: write the code in something like the free Visual Studio Code, or - and this would be my favorite option - swap out your tabs for spaces as someone else mentioned in a remark.

Here's a visual comparison:

Comparison of three cells containing code

answered Jan 19, 2023 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer
0 votes
1 answer

How can I allow a user to change a cell in excel only under particular conditions?

Copy the next event code in the ...READ MORE

answered Jan 31, 2023 in Others by narikkadan
• 63,600 points
588 views
0 votes
1 answer

How to set a column as a range variable as long as there is data in it?

Try this: Dim rng As Range Set rng = ...READ MORE

answered Feb 16, 2023 in Others by narikkadan
• 63,600 points
612 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
1,210 views
0 votes
1 answer

ImportError: openpyxl is required for loading excel format files

Forget the PsychoPy complications for the time ...READ MORE

answered Oct 3, 2018 in Python by Priyaj
• 58,020 points
1,077 views
0 votes
1 answer

In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

answered Oct 15, 2018 in RPA by Priyaj
• 58,020 points
4,366 views
0 votes
1 answer

Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE

answered Oct 22, 2018 in Power BI by Annie97
• 2,160 points
4,251 views
0 votes
1 answer

How can I use a command button in excel to set the value of multiple cells in one click?

Try this: Private Scan As Integer Private Sub CommandButton1_Click() ...READ MORE

answered Oct 24, 2022 in Others by narikkadan
• 63,600 points
782 views
0 votes
1 answer

How to unmerge multiple cells and transpose each value into a new column in Pandas dataframe from excel file

Try this: df = pd.read_excel("Sample_File.xlsx", header=[0,1,2,3,4,5], index_col = ...READ MORE

answered Jan 8, 2023 in Others by narikkadan
• 63,600 points
2,526 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP