+ Reply to Thread
Results 1 to 26 of 26

Look up word then multiply by number

  1. #1
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Look up word then multiply by number

    Hi

    Hoping someone can help me

    Im looking to produce a formula

    I need a drop down box in J19 with options

    Monthly commission £2
    Monthly commission £2.33
    Monthly commission £2.55

    Then the below formula will calculate the number of carbon tonnes and multiply it by the monthly commission amount chosen in the drop down box and put it in the correct pay period. See below

    To fill in cell J21 i want the formula to look up Column G the words Period 9. Any rows which contain Period 9 need the Cell D (Carbon Tonnes) on the same row to be multiplied by the number in the drop down box in J19 which will give me my answer

    If someone could let me know how I can do it that would be great. I think it would need something to

    Tester.xlsx

  2. #2
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Look up word then multiply by number

    HI, Check out the attachment, this is what you are looking for ?
    Attached Files Attached Files
    Click just below left if it helps, Boo?ath?

  3. #3
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Hi,

    Please see the attached file, I have updated the formula.


    J20 = IFERROR(INDEX($A$1:$G$3,MATCH(I20,$G$1:$G$3,0),4)*(1*(MID($J$19,SEARCH("£",$J$19,1)+1,4))),"") and drag down
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look up word then multiply by number

    Is this what you ewanted? The rates are in a Named Range on Sheet 2. Let me know if I've misynderstood your request...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Hi Boopathiraha Thanks for the help. Its almost right but the sums don't work

    Period 9 on monthly commission at £2 should show 20 carbon tonnes x £2 = £40 but yours show £4800?

  6. #6
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Hi cbatrody

    Thats it. Works perfectly. Thank you

  7. #7
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Thanks Glenn Kennedy also it works

  8. #8
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    You are welcome

    I guess even Glenn's template as well works.

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

    Also, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful.

  9. #9
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    multiply-by-number-tester-1.xlsx

    Bit of a problem. I've tested it further down the page and its not calculating it. I need the cell formula to go down as far as i can as data will be added to this. I've dragged the formula right down but it dosn't seem to work?
    Last edited by Cdyerbg; 08-18-2014 at 05:19 AM. Reason: Add file

  10. #10
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Hi,

    Please see the updated file. I have modified the formula in J20.

    =SUMPRODUCT(--($G$2:$G$2000=I20),--($D$2:$D$2000))*(1*(MID($J$19,SEARCH("£",$J$19,1)+1,255)))
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look up word then multiply by number

    It's because the range in the formula is set to look only at A1 to G3. Either reset the formula you are using to the correct range, or use my version, which looked down the entire length of columns D & G.

  12. #12
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Thanks both of you. Your both helping LOADS!

    When I clear the contents of the cells in order to input the actual data it seems to wipe the formulas

    I've tried protecting the sheet and formulas but it locks the cells completely. I need the formulas locked but an allowance to edit the data put into them?

  13. #13
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Did you check the file I uploaded in my last post?

  14. #14
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Yeah that worked cbatrody but when i cleared the dates and carbon tonnes it then would not work so i assumed it was clearing the data too?

  15. #15
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Yes, it works based on column D & column G data. When you clear those columns, the results will be blank.

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look up word then multiply by number

    When you say

    "When I clear the contents of the cells in order to input the actual data..." which cells are you talking about ? columns D & G - in which case, don't worry; when you put in the actual data the formula will stiull work. Or did you mean cells J20 and below. In whcich case that will delete the formulae... That's not what you want to happen...

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look up word then multiply by number

    When you say

    "When I clear the contents of the cells in order to input the actual data..." which cells are you talking about ? columns D & G - in which case, don't worry; when you put in the actual data the formula will stiull work. Or did you mean cells J20 and below. In whcich case that will delete the formulae... That's not what you want to happen...

  18. #18
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Can the formulas be locked but the content to be editable as thats what i want? Someone will type data in and clear it at the end of the month and all formulas will be erased?

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look up word then multiply by number

    Our posts passed each other in cyberspace... Which cells are you deleting the content from?

  20. #20
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Yes, that's possible, you need to lock the cells with formulae and protect the sheet with a password.

  21. #21
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Hi Glenn

    Yeah I was clearing G collumn as well but when i leave the collumn alone its fine now

    Is there still anyway to lock the formulas down so they cant be accidentally edited or deleted? I just want it as a database where information can be put into

    A-F and then the relevant formulas will work it out for you

  22. #22
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look up word then multiply by number

    Yes you can lock cells down slectively. It's not difficult, but you do need to stay awake. you can lock the whole sheet down from FORMAT / PROTECT SHEET. Use the default seting and put in a password, if you wish. However, before you do that, you have to set which cells the user can edit.. Do that from REVIEW / Allow users to edit ranges. ONLY those cells that you select there can be adjusted by the user. Don't forget to let them change J19, too (your drop down box).

  23. #23
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Please select the cells to be locked (cells with formulae), then follow the procedure mentioned in the following URL

    https://www.computing.vt.edu/kb/entry/1913

  24. #24
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Tried what you both said and it dosn't seem to work

    I have highlighted A-F cells and put in the allow users to edit ranges and an additional J19

    Then protected the worksheet but it still lets them play with the formula in Collumn G?

  25. #25
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Look up word then multiply by number

    Please see the attached file, I have hidden & Locked the cells with formulae and password protected the sheet.

    password: abcd
    Attached Files Attached Files

  26. #26
    Registered User
    Join Date
    08-10-2014
    Location
    UK
    MS-Off Ver
    2007
    Posts
    15

    Re: Look up word then multiply by number

    Thanks. Thats perfect. Not sure how you managed to do it but it works

+ 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. Multiply two cells if cell contains a specific word
    By rkobeyer in forum Excel General
    Replies: 1
    Last Post: 07-25-2014, 08:27 PM
  2. [SOLVED] Formula. Multiply B*C*E or B*D*E if D has a number. ALSO presume B to be 1 if NO number
    By marsham in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2013, 05:52 AM
  3. Take cell with text and number and multiply with number
    By smuqeet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-06-2012, 04:22 PM
  4. Replies: 2
    Last Post: 01-07-2010, 03:21 PM
  5. multiply a row by a certain number?
    By multiply a row by a certain number? in forum Excel General
    Replies: 2
    Last Post: 03-07-2005, 06:06 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