+ Reply to Thread
Results 1 to 17 of 17

Create modifier on multiple cells that affects formula

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Create modifier on multiple cells that affects formula

    Ok folks, how are all of you?

    I have a calculator that I am making for a roleplaying game I enjoy. In it, if an item has a number of charges per day it modifies the formula for creating it.

    I want to have drop down boxes beside each option that can be made into a charges per day item, which I have done, but I want it to modify a portion of the formula later on in another cell.

    So something like =(IF(C2:C20)=Yes,get value from c2:c20 but only ones with yes, perform formula c2:c20/(5/number of charges per day)," ")

    basically I dont know how to make modifiers for each of the 15 cells cells I am working with. It is important that each one be calculated separately because some of the cells may have information in them but they shouldn't be reduced in price unless they are charges per day.

    Thanks for your time!
    Last edited by 7r1ck573r; 05-17-2013 at 11:29 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Tricky for me but not for you I hope

    Hi and welcome to the forum

    We would love to help you with your question, but 1st, in accordance with forum rules, please rename your thread to something more meaningful, that actually describes your problem.

    Because thread titles are used in searching the forum it is vital they be written to accurately describe your thread content or overall objective using ONLY search friendly key words. That is, your title used as search terms would return relevant results.

    Many members will look at a thread title, and if it is of interest to them, or it falls within their area of expertise, they might only open those threads.

    Look at it this way...if you typed that title into google, what would you expect to get back?
    To change a Title on your post, click EDIT on you're 1st post, then Go Advanced and change your title
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    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,464

    Re: Tricky for me but not for you I hope

    Hi, welcome to the forum.

    You will, almost certainly, be asked by the moderators to change your thread title to something that better describes your problem, making it search engine friendly. if you have a few minutes, have a look at the forum rules.

    In the meantime, one suggestion would be to use SUMPRODUCT:

    =SUMPRODUCT(--(C2:C20="yes"))


    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


  4. #4
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Tricky for me but not for you I hope

    titled changed to the best of my abilities to describe my issue.

    Will sumproduct do something from like

    A1 B1 C1
    4 16000 Yes
    A2 B2 C2
    2 2000 no
    A3 B3 C3
    1 2000 no

    All of the b's get added together in the formula but B1 is modified by another number because it is a yes. But I want B2 and B3 not to be modified unless they also say yes.

    Does that make more sense?

  5. #5
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    Should I use a table for all this information instead?

    tables can be basically nested formulas right?

  6. #6
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    bit of a noob at excel but I have been learning a lot the last couple of days making this thing work.

  7. #7
    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,464

    Re: Create modifier on multiple cells that affects formula

    Thank you for changing the thread title.

    As an example:

    =SUMPRODUCT(--(C2:C20="yes"),--(B2:B20*5))


    If you want a specific answer, you need to explain in more detail what it is you are trying to do. The above formula will multiple the values in cells B2 to B20 by 5 but only where the matching values in C2 to C20 equal "yes".

    Maybe this is more like what you need:

    =SUMPRODUCT(--(C2:C20="yes"),--(B2:B20),--(A2:A20))


    I'll let you work out what that does


    Regards, TMS

  8. #8
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    Looking at my current formulas I think I found a better route to go anyways. I will let you know if it doesn't. Thanks for your help.

  9. #9
    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,464

    Re: Create modifier on multiple cells that affects formula

    Whatever.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  10. #10
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    Actually can I use this same method to figure out which of the items are the largest number and keep it the same, then find the second highest and multiply it by 75% and then find the rest and multiple them by 50% and then spit all of that data added together into a cell?

  11. #11
    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,464

    Re: Create modifier on multiple cells that affects formula

    No idea. You seem to imagine that I know what your data looks like and how it is laid out. You can do many, if not most, things with a little thought and application.

    To get the largest and second largest you could use LARGE. Armed with that data, you could sum the rest of the data and subtract the highest two.

    So, in broad terms, you'd have

    =LARGE(range,1)+LARGE(range,2)*75%+(SUM(range)-LARGE(range,1)-LARGE(range,2))*50%


    Regards, TMS

  12. #12
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    the data would be from one column spanning 12 rows. If for instance C1 was 16000,c2 was 4000, C3 was 1000, and C4 was 2000 then C1 would be 100% C2 would be 75% and c3 and c4 would be at 50%. then getting summed together it would be 16000+3000+500+1000=20500.

    Does that make it specific enough? I am trying to give as much description as possible so I can create this. I appreciate everyone's help so far. Talking to a buddy who is a DB admin but he says he needs to see it in person if he is going to help.

  13. #13
    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,464

    Re: Create modifier on multiple cells that affects formula

    In the pseudo formula I gave in the last post, change every reference to "range" to "C1:C12", no quotes ... or whatever.

    =LARGE(C1:C12,1)+LARGE(C1:C12,2)*75%+(SUM(C1:C12)-LARGE(C1:C12,1)-LARGE(C1:C12,2))*50%


    I understand your buddy's viewpoint. It would be a lot easier for someone to offer a solution if you uploaded a sample workbook.


    Regards, TMS

  14. #14
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    How does one go about doing that? I could always email you the workbook or something?

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Create modifier on multiple cells that affects formula

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  16. #16
    Registered User
    Join Date
    05-17-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create modifier on multiple cells that affects formula

    TMS that worked perfectly! Thank you so much! I have a bit of reworking to do because I wasn't thinking of the true scope that I needed to be on for this project but that will certainly fix the main issue I was having with that portion of the calculator.

    (Thanks FD if I have any more questions and need to upload info I will know how to do that.)

  17. #17
    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,464

    Re: Create modifier on multiple cells that affects formula

    You're welcome.

+ 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