+ Reply to Thread
Results 1 to 5 of 5

Referencing cell value (number) within a macro

  1. #1
    Registered User
    Join Date
    03-19-2020
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Referencing cell value (number) within a macro

    Hey guys

    I am wondering how i reference a cell value (number) from within a macro.

    I essentially want the number in the cell to populate in the macro;

    macro is here;

    Please Login or Register  to view this content.

    Where "26" is, I want to reference cell F2, then G2, then H2

    I tried Range(“H2”).Value but that doesn't seem to work.

    Thanks
    Last edited by Pepe Le Mokko; 03-20-2020 at 09:26 AM. Reason: Code tags

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Referencing cell value (number) within a macro

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Referencing cell value (number) within a macro

    Please Login or Register  to view this content.
    Last edited by sintek; 03-20-2020 at 02:09 PM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    03-19-2020
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: Referencing cell value (number) within a macro

    Quote Originally Posted by sintek View Post
    Please Login or Register  to view this content.
    You're a legend, thanks so much"

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Referencing cell value (number) within a macro

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Replies: 4
    Last Post: 05-12-2019, 11:13 AM
  2. Replies: 1
    Last Post: 10-16-2014, 08:08 PM
  3. Referencing cell above, add next sequential number when clicking on blank cell
    By greatwent in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2013, 12:42 PM
  4. Formula referencing a cell using a number of another cell
    By PAUL41EXCEL in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-20-2013, 03:03 AM
  5. [SOLVED] Referencing a cell (range instead of 1 number)
    By zippersweater in forum Excel General
    Replies: 4
    Last Post: 06-08-2012, 12:49 PM
  6. Cell referencing a Row plus a number
    By cmyerscpa in forum Excel General
    Replies: 1
    Last Post: 08-25-2011, 06:03 PM
  7. [SOLVED] Equation Referencing Row Number Stored in Cell
    By Jim Hagan in forum Excel General
    Replies: 1
    Last Post: 04-13-2005, 04:06 PM

Tags for this Thread

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