Results 1 to 4 of 4

Use a variable as the row address of a cell

Threaded View

tomasball Use a variable as the row... 11-16-2021, 07:15 PM
WideBoyDixon Re: variables 11-16-2021, 07:21 PM
mehmetcik Re: variables 11-16-2021, 07:27 PM
AliGW Re: Use a variable as the row... 11-17-2021, 04:03 AM
  1. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: variables

    Administrative Note:

    Welcome to the forum.

    Please use the Code Tags from now on.


    
    myvariable=1
    Range("A" & myvariable).Value ="blue"
    Range("A1:D" & myvariable).value = ="blue"
    
    'Often used like
    
    'Last Used cell in column A
    LR = Cells(Rows.Count, 1).End(xlUp).Row
    Range("A1:D" & LR).Value ="blue"
    
    Range("A1",cells(LR,4)).Value ="blue"
    
    Range(cells(1,1),cells(LR,4)).Value ="blue"
    Last edited by AliGW; 11-17-2021 at 04:04 AM. Reason: Moderation request removed. Gurus & experts have been instructed to leave the moderating to mods & admins. Thanks.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

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