VBA Macro Assistance

bepedicino

Board Regular
Joined
Sep 29, 2014
Messages
73
I have a spreadsheet where many of the cells contain a scientific notification, I need them to be text cells. I tried changing the format but Excel will not convert the cells unless I double left-click in each cell and then press enter in each of the affected cells.

Could someone please assist by providing me a macro that will double left-click on each cell and then move on to the next cell for all cells in column B of the current active sheet? Or if there is another better solution that would be great. Your assistance is greatly appreciated.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Have you tried doing a text to columns>fixed width> choosing text format.....
 
Upvote 0
Yes, I have. Unfortunately it did not correct the issue.

I am surprised that doesn't work for you.

In any case, maybe a macro like this (untested)
Code:
Sub DoubleClickCells()
    Dim rng As Range
    For Each rng In Selection
        Application.SendKeys "{F2}{ENTER}"
    Next
End Sub

Create a shortcut to run the macro and press shortcut to trigger it. If run from the visual basic editor, you won't get the desired results

Highlight the cells you want to double click and then press shortcut to run macro
 
Upvote 0

Forum statistics

Threads
1,216,308
Messages
6,129,993
Members
449,550
Latest member
LML2892

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