+ Reply to Thread
Results 1 to 9 of 9

Can a blank cell be assigned a number from another cell? Working on this today.

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    midatlantic
    MS-Off Ver
    Excel 2003
    Posts
    6

    Can a blank cell be assigned a number from another cell? Working on this today.

    I have a huge election and will be using Excel to tally the votes. Each member has a different percentage interest and there are three votes per member. The candidates names are in the top row and I have each percentage down the first column.

    Is there a way to assign all cells in each individual row with that percentage value from the first column so when I get a vote and type an X into the cell, it will automatically know that X equals the percent assigned?
    Then in the "total" cell in the very bottom row, I would just do =sum(), select the whole column, and it would add up all of those different percentages that were assigned.

    I don't know what version of Excel I have at work, sorry!
    I am working on this today for the meeting on Monday so any help you have is greatly appreciated! Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    Try SUMIF. It would look something like:

    =SUMIF(B2:B7,"x",$A$2:$A$7)


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    midatlantic
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    That is probably exactly what I am looking for, but can you go into a bit more detail please? This is what I have so far-

    A2- percentage
    B2, C2, D2 need to be assigned the number from A2.

    Thanks for responding so quickly to my question!

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    I'm not so sure that Trevor's solution is what you are looking for. Can you upload an example worksheet of what you have and what you want? (Go Advanced>Manage Attachments)

    Are you saying that if you type an "X" into D2 (for example), it will automatically place the value in A2 into D2?
    That will require a short VBA solution.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    @ChemistB: I don't think anything sophisticated is needed.

    If your percentages start in cell A2 down, then the total in column B is: =SUMIF(B2:B7,"x",$A$2:$A$7) ... adjust the 7 to be the last row of data.

    Then drag the formula across. Column A is fixed but column B will auto adjust.


    HTML Code: 
    Last edited by TMS; 10-19-2012 at 09:36 AM.

  6. #6
    Registered User
    Join Date
    10-19-2012
    Location
    midatlantic
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    I have included my example- I think you guys know what I am looking to do, put an x into the name column when someone gets a vote, then the total should go into the very bottom cells. I can do the totaling by hand with the =sum() once all the votes have been put in.

    I thought I had decent excel knowledge but apparently not so, so thank you SO much the helping me with this and walking me though it!.

    Where exactly do I insert the formula?

    "Are you saying that if you type an "X" into D2 (for example), it will automatically place the value in A2 into D2?
    That will require a short VBA solution."
    Yes, this is what I need.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-19-2012
    Location
    midatlantic
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    Election.xlsxI have included my example- I think you guys know what I am looking to do, put an x into the name column when someone gets a vote, then the total should go into the very bottom cells. I can do the totaling by hand with the =sum() once all the votes have been put in.

    I thought I had decent excel knowledge but apparently not so, so thank you SO much the helping me with this and walking me though it!.

    Where exactly do I insert the formula?

    "Are you saying that if you type an "X" into D2 (for example), it will automatically place the value in A2 into D2?
    That will require a short VBA solution."
    Yes, this is what I need.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    You need a worksheet change event, if that is what you want to do:

    Please Login or Register  to view this content.

    Regards, TMS

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can a blank cell be assigned a number from another cell? Working on this today.

    To use Trevor's code
    Right click on the worksheet tab > "View Code" (opens the VBA editor)
    Paste code into large white text box on right
    Close window.

    Playing Thread tag with TMShucks

+ 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