Results 1 to 4 of 4

Use a variable as the row address of a cell

Threaded View

  1. #1
    Registered User
    Join Date
    11-16-2021
    Location
    New Mexico
    MS-Off Ver
    2016
    Posts
    1

    Use a variable as the row address of a cell

    I hope I can explain my question. Can I write a code for a command button that says something like:
    myvariable=1
    Range("A(myvariable)").Value ="blue"

    ...now, I realize that won't work as written, but is there some way to use a variable as the row address of a cell?

    Thanks for your patience
    Last edited by AliGW; 11-17-2021 at 03:59 AM. Reason: Title changed - please think more carefully about your thread titles in future!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] [Windows Environment Variables] Change user variables using VBA
    By alexgoaga in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2018, 09:06 PM
  2. Storing variables as string or as variables in array performance
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2017, 08:35 AM
  3. [SOLVED] finding an output from 5 variables in an array using exterior input user variables
    By Allsort in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2013, 11:16 AM
  4. Replies: 3
    Last Post: 09-11-2012, 02:03 AM
  5. macro that finds variables in one column and enters values if variables found
    By xln00b in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-07-2010, 08:22 AM
  6. Multiple variables:bunch of variables
    By sbq80 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-19-2009, 04:22 PM
  7. Unzip Code - Works without Variables, Breaks with Variables...
    By AdamParker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-06-2009, 02:35 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