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 in Others by Kithuzzz
• 27,740 points
35 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 by narikkadan
• 51,240 points

Related Questions In Others

0 votes
1 answer
0 votes
0 answers

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

In an excel document, column A's whole ...READ MORE

8 hours ago in Others by Kithuzzz
• 27,740 points
14 views
0 votes
1 answer
0 votes
1 answer

How to set margin for a Container in Flutter?

Hi@akhtar, Margin property is used to set empty ...READ MORE

answered Jul 29, 2020 in Others by MD
• 95,420 points
5,619 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
522 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,100 points
470 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,100 points
3,484 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
2,987 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
• 51,240 points
138 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 in Others by narikkadan
• 51,240 points
75 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