Excel Pop Out cell contents for entire worksheet

QTQ28

New Member
Joined
Sep 5, 2024
Messages
16
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hi Friends! I'm not a brainy code person, so I need help here fromt his amazing group of code wizards. I'm working on a spreadsheet where I have the text wrapped, but being that some cells have a lot of text, and I want to keep the cells small for visual appeal, I really want to find a way for the text of the cell to pop out for easy reading which i click on it. Can someone help please?
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Welcome to the Board!

You could use VBA to return the entire contents of the cell to a Message Box. It would then show it in its entirety, and then would need to click on the OK message box in order to close it.
You could limit it to run on just a certain range. For example, if we only wanted to apply this to column G, our code would look like this:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'   Only run if a single cell is selected
    If Target.CountLarge > 1 Then Exit Sub

'   Only run if a cell in column G is selected
    If Not Intersect(Target, Range("G:G")) Is Nothing Then
        MsgBox Target.Value
    End If
    
End Sub
In order for this to work, it MUST be placed in the proper spot in the VBA Editor. The easiest way to ensure this is to go to the sheet you want to apply this code to, right-click on the Sheet tab name at the bottom of the screen, select "View Code" and paste the VBA code above into the VB Editor window that pops up. Then as long as you have VBA enabled on this workbook, this code will run automatically when you select any cell in column G.
 
Upvote 0
Solution
Welcome to the Board!

You could use VBA to return the entire contents of the cell to a Message Box. It would then show it in its entirety, and then would need to click on the OK message box in order to close it.
You could limit it to run on just a certain range. For example, if we only wanted to apply this to column G, our code would look like this:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'   Only run if a single cell is selected
    If Target.CountLarge > 1 Then Exit Sub

'   Only run if a cell in column G is selected
    If Not Intersect(Target, Range("G:G")) Is Nothing Then
        MsgBox Target.Value
    End If
   
End Sub
In order for this to work, it MUST be placed in the proper spot in the VBA Editor. The easiest way to ensure this is to go to the sheet you want to apply this code to, right-click on the Sheet tab name at the bottom of the screen, select "View Code" and paste the VBA code above into the VB Editor window that pops up. Then as long as you have VBA enabled on this workbook, this code will run automatically when you select any cell in column G.
Oh thank you! what if i want it for columns C - K?
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 1
You are welcome.
Glad I was able to help!
it's not working. I messed it up somehow. Can you help again? Here is the code and a mock worksheet:

1727447238806.png


1727447151062.png
 
Upvote 0
Did you change anything, or add any other VBA code?
Are you sure that you have enabled VBA/Macros on this workbook when you opened it?
 
Upvote 0
Did you change anything, or add any other VBA code?
Are you sure that you have enabled VBA/Macros on this workbook when you opened it?
not that i know of, but I'm not confident in any of that. How can I check to see if I have enabled macros?
 
Upvote 0
Add a real simple Macro like this in the VBA section of that workbook:
VBA Code:
Sub Test()
    MsgBox "VBA is enabled!"
    MsgBox Application.EnableEvents
End Sub
And try running it and see if it returns any messages.
If it does, please tell me what the second message returns.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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