+ Reply to Thread
Results 1 to 2 of 2

Get list of variables

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Get list of variables

    Hello,
    I need a macro to generate a list of all the variables within a formula in a cell.
    The list should not include any of the Excel formulas or operators.
    Example, my cell contains the following formula:
    =(SQRT(Area)+2 * Perim- Lenght Total)*Count^2
    The list in this case is:
    Area
    Perim
    Lenght Total 'notice the space
    Count
    Thanks in advance!

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,594

    Re: Get list of variables

    Put the list in column A:
    Range("A1").ListNames

    Edit:You will need column B blank also since it will list the "refers to" cells.
    Last edited by protonLeah; 11-06-2016 at 06:30 PM.
    Ben Van Johnson

+ 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] If formula with 2 variables in dropdown list.
    By Antligen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2016, 05:58 AM
  2. Loop Through List to Change Variables
    By racer25 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2016, 02:48 PM
  3. Replies: 3
    Last Post: 06-14-2014, 03:05 PM
  4. Multiple Variables for Lookup and List
    By capitalsfan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2013, 05:20 PM
  5. Looking up results from a list with two variables
    By damage in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 08-13-2013, 07:11 AM
  6. VBA Pivot Item List with Variables
    By AmateurXL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2012, 12:48 PM
  7. List of variables
    By w_lred in forum Excel General
    Replies: 1
    Last Post: 11-21-2008, 06:26 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