NeVeR Posted July 10, 2018 Report Share Posted July 10, 2018 I'm building a macro to gather data for a report and place it into a template in excel. Getting the data is fine, but is it possible to have the macro find a cell in excel to paste bits of copied data ? I know how to get it to open excel etc and I could probably find the right location by building the macro to tab / arrow into certain cells in excel.. but if it could find sell C4 with ease then it would be a quicker / easier time for me. Any tips welcomed thanks. Quote Link to comment Share on other sites More sharing options...
Samrae Posted July 10, 2018 Report Share Posted July 10, 2018 Pressing Ctrl+G or F5 in Excel brings up a dialog box to go to a cell. You can create a macro to type what is needed. Something like this: Text Type: <CONTROL>g Wait For Window Title: "Go To" Text Type: C4<ENTER> Quote Link to comment Share on other sites More sharing options...
NeVeR Posted July 10, 2018 Author Report Share Posted July 10, 2018 cool.. didn't know excel had this.. this will work. thanks. Quote Link to comment Share on other sites More sharing options...
Samrae Posted July 10, 2018 Report Share Posted July 10, 2018 2 minutes ago, NeVeR said: didn't know excel had this.. Neither did I before this. Google is your friend. ? Quote Link to comment Share on other sites More sharing options...
acantor Posted July 10, 2018 Report Share Posted July 10, 2018 There is another way to navigate to a particular cell in Excel, but it doesn't involve Macro Express. The method executes a little quicker, and is not as "flashy" because it doesn't involve the "Go To" dialog box. 1. Expose the "Developer" ribbon in Excel. 2. Click "Developer," and choose "Record." 3. You will be prompted to assign a "Shortcut key" to your macro, Ctrl + something. Choose a combo like Ctrl + forward slash... on any key that that you are unlikely to press by accident. 4. Choose to save the macro in either "This Workbook" (so that the shortcut key will only be available in this workbook); or "Personal Macro Workbook" (so it will be available in other workbooks.) 5. Then use Samrae's method to navigate to the cell: press Ctrl + G, type the cell number, and then press Enter. 6. Click on the "Developer" ribbon, and stop the recording. 7. Then press your shortcut key to activate the Excel macro. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.