+ Reply to Thread
Results 1 to 5 of 5

assigning a value for a variable for the entire worksheet

  1. #1
    Registered User
    Join Date
    05-28-2010
    Location
    Maldives
    MS-Off Ver
    Excel 2007
    Posts
    15

    assigning a value for a variable for the entire worksheet

    for example i want to assign value "1" for letter "A".

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: assigning a value for a variable for the entire worksheet

    May need more details but try this

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: assigning a value for a variable for the entire worksheet

    Hi,

    Are you referring to a VBA variable or an Excel Application variable?

    If the former then just Dim an 'A' variable and set it to '1'.

    Otherwise create a range name called 'A' and in the 'refers to' box enter '=1'
    Now you can use '=A' anywhere in your sheet or formulae and return the value 1

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    05-28-2010
    Location
    Maldives
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: assigning a value for a variable for the entire worksheet

    what i want is to assign a value for A for example. And use the count function to add the repeated As from that worksheet in another cell

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: assigning a value for a variable for the entire worksheet

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Keep it simple...
    Doing this will ensure you get the result you need!

+ 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