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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,100
Messages
5,768,097
Members
425,453
Latest member
bince

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
Top