+ Reply to Thread
Results 1 to 5 of 5

Set variable to be value of column G when any cell in row changes

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    Oregon
    MS-Off Ver
    Excel 2010
    Posts
    29

    Set variable to be value of column G when any cell in row changes

    Hello. I am trying to set a variable based on the value of the cell in column G of the row that is changed. For example, if I change cell A 5 I would want the value in G 5 to become the variable. If I change the value in AZ 5 I would still want the value in G 5 to become the variable. Whatever row I make the change in, I want the value in column G of that row to be the variable.

    I hope that all made sense.

    Thanks

    Matt

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this …


    As a beginner starter to paste to the worksheet module :

    PHP Code: 
    Private Sub Worksheet_Change(ByVal Target As Range)
        
    Cells(Target.Row7).Value
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Registered User
    Join Date
    01-22-2014
    Location
    Oregon
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Set variable to be value of column G when any cell in row changes

    Thanks for your help, but I am getting a Compile Error: Variable not defined. It is highlighting the word 'Target'.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Set variable to be value of column G when any cell in row changes


    No issue on my end so just read & apply the post #2 direction

  5. #5
    Registered User
    Join Date
    01-22-2014
    Location
    Oregon
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Set variable to be value of column G when any cell in row changes

    Perhaps the problem is because I have other code. Below is the total code I am trying to use. The variable name I am trying to set is 'filter'. I appreciate all your help.

    Please Login or Register  to view this content.

+ 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. [SOLVED] Column A & B Match then select cell from a variable adjacent column on same row
    By Belinea2010 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-08-2015, 08:59 PM
  2. [SOLVED] Use Cell Function with Variable as column or row
    By strother1990 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-04-2014, 04:50 PM
  3. [SOLVED] Paste Cell on a certain column and variable row
    By MariPip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2014, 07:16 AM
  4. [SOLVED] Set cell equal to variable cell (from set column) based on cells in adjacent column
    By alter54 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2014, 01:04 PM
  5. Column Cell Count with variable in column marker, Type mismatch
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2013, 11:39 AM
  6. [SOLVED] Set Variable As First Empty Cell In Column
    By danderson2692 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2012, 09:52 AM
  7. Last Cell in a Variable Length Column
    By akj375 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2011, 10:25 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