+ Reply to Thread
Results 1 to 4 of 4

Active Cell Row Determined By Another Cells Value +1

  1. #1
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Active Cell Row Determined By Another Cells Value +1

    Hi guys,


    I have the following VBA;

    Please Login or Register  to view this content.

    I need some code that rather than references Row 13 as above, its gets the Row number by using the value in Cell F1 +1.


    So


    Example 1)

    If Cell F1 = 10

    then i want the VBA code above to use this logic;

    If ActiveCell.Address = "$Q$11" Then


    or


    Example 2)

    If Cell F1 = 8

    then i want the VBA code above to use this logic;

    If ActiveCell.Address = "$Q$9" Then


    How do i create this VBA code If Statement?



    Any help appreciated, thank you!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Active Cell Row Determined By Another Cells Value +1

    Please Login or Register  to view this content.
    This assumes that either:
    • This code is in the worksheet containing the cell F1, or
    • The worksheet containing the cell F1 is the ActiveSheet
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    02-09-2016
    Location
    West Midlands
    MS-Off Ver
    2016
    Posts
    224

    Re: Active Cell Row Determined By Another Cells Value +1

    Brilliant! Works like a charm

    Feedback and positive Rep left!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Active Cell Row Determined By Another Cells Value +1

    Glad to hear it, and thanks!

+ 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. Formula to total cell values within a range determined by combination of other cells.
    By Victorthesecond in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2018, 01:17 PM
  2. user-determined adding of cell values in a column: code breaks down after 2 cells
    By simz92 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2017, 05:12 AM
  3. Pasting a formula between two active cells - one active cell varies
    By Andrewstupendo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-21-2015, 01:23 PM
  4. Replies: 4
    Last Post: 07-03-2015, 04:27 AM
  5. [SOLVED] Construct a formula on a pre-determined cell for a pre-determined duration of cells
    By Shaun Gemiver in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-03-2013, 11:14 AM
  6. Replies: 1
    Last Post: 07-08-2012, 08:47 AM
  7. Adding Value of Cells, but Cell Determined by Dropdown List
    By concretetsunami in forum Excel General
    Replies: 4
    Last Post: 03-09-2010, 04:19 PM

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