insert cursor

y481184

Board Regular
Joined
Aug 1, 2003
Messages
137
I have two cells that I am trying to manipulate. The first cell is blank and this is where the user inserts a numerical unit e.g 10. I want the cell directly after this one to default to "lbs of." I accomplished this by simply including this in Range("G37").Value = "lbs of"
My quation is how to go about making the cell active and place the cursor in cell G37 directly after "lbs of." I know this can be accomplished by pressing F2, but I would like it to activate and accept text automatically without overwriting the default value in the cell.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
This worked for me:

Sub Test()
Range("G37").Value = "lbs of "
Range("G37").Activate
SendKeys "{F2}"
End Sub

The sheet must be active and the SendKeys statement must be the last in you code.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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