+ Reply to Thread
Results 1 to 3 of 3

Displaying the value of a VBA variable in the excel workbook

  1. #1
    Registered User
    Join Date
    08-29-2011
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010Win, 2011Mac
    Posts
    4

    Displaying the value of a VBA variable in the excel workbook

    Hi there!
    I would like to be able to do this: Data is enterred into varius cells in excel, then a sub does something with those, and a numerical value for variable X is found. Is there a way to display the value of X in the active cell in the workbook? I understand this would be much easier to do with just a simple user-defined function, but I am doing this for a class, and the instructions are to do this with a sub specifically. Kind of odd I think, but there it is.
    Any tips would be appreciated!

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Displaying the value of a VBA variable in the excel workbook

    Is the instructor trying to make sure that you know how to
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    08-29-2011
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010Win, 2011Mac
    Posts
    4

    Re: Displaying the value of a VBA variable in the excel workbook

    Thank you, that helps - although not exactly what I need to do.
    The data is from an array that the user selects in the workbook (for example A1:B3)
    and you get a number, X - which must be displayed in a cell two columns to the right of the farthest right column of the select aray.
    Please Login or Register  to view this content.
    But rather than it be in put in A1, it needs to be in the active cell, selected in the line above. This may not be a good approach in the first place though, so I'm open to other ways of doing this!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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