+ Reply to Thread
Results 1 to 2 of 2

how do I make a macro that goes to cell address listed in a different cell

  1. #1
    Registered User
    Join Date
    11-18-2015
    Location
    USA
    MS-Off Ver
    2007
    Posts
    1

    how do I make a macro that goes to cell address listed in a different cell

    I have excel 2007
    I'm just learning macros. Here's the setup.


    sheet 1 is for getting the miles from city a to city b
    i.e. a1 I input city a. a2 I input City b the on b2 it will tell me what the mileage is.


    Sheet 2 has my mileage chart where all the mileage info is stored from city to city
    It's pretty much set up like every other mileage chart you see on a map with the city name across the top row and the same name on the left column
    then the mileage is set in the grid


    every once in a while I will input a city name into sheet 1 and I haven't yet input that number into sheet 2 yet so 0 is displayed
    I have added 3 cells in sheet 1 to automatically enter the correct mileage into the mileage chart


    the 1st cell I input city a
    the 2nd cell city b and the 3rd cell the mileage



    the next thing I have are 3 cells in sheet 2
    the 1st cell (lets call it A1) tells me the r#c# of the intersection of the 2 cities
    the 2nd one (A2) tells me the opposite r#c# since each mileage is listed twice depending on whether its from city 1 to city 2 or city 2 to city 1
    the 3rd (A3) is the mileage that I input in sheet 1


    now what ive been doing is just copying the R#c# from A1 and pasting it into the name box and hitting enter. It then brings me to that location
    and then I type in the mileage
    then copy and paste the 2nd address located in A2 into the name box and entering the miles again.



    what I want is a macro so all I have to do after entering the 2 city names and mileage into sheet 1
    is run the macro and have it automatically go to the addresses specified in sheet 2 and input the mileage in for me
    every time I try this the macro does not record me pasting the R#C# from A1 and A2 into the name box and hitting enter.
    It just inputs the mileage into the same boxes every time. Since the address is going to be different every time this just wont work.



    So how to make a macro that goes to a certain address located in a separate cells (A1and A2) and inputs information into those cells thats located in a separate cell (A3)
    Last edited by katralic; 11-19-2015 at 01:09 AM. Reason: additional info

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: Need help with a macro. New to programming

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. macro programming
    By AnDrew_1314 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2014, 04:30 AM
  2. Help programming a Macro.... really new to VBA :(
    By AlonQ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2013, 05:05 PM
  3. Macro Programming
    By Legendkiller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2008, 03:47 AM
  4. Help with programming a macro...
    By swalsh19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2008, 12:07 AM
  5. Need help on macro programming
    By zaidi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2006, 03:08 PM
  6. Programming a new macro
    By Trond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2006, 05:55 AM
  7. Macro Programming using VB
    By KRISHNA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2005, 04:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1