+ Reply to Thread
Results 1 to 12 of 12

If criteria match multiply one cell with the cell right next to one of the matched criteri

  1. #1
    Registered User
    Join Date
    03-15-2014
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    61

    If criteria match multiply one cell with the cell right next to one of the matched criteri

    Hot to refer to the right next cell in this formula?



    =COUNTIF(Orders!A:A;A5)*( the cell to the right of the refered cell )


    Means, multiply with the values on the cell at the right of A5 match cells.

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

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Sounds like you want to use SUMPRODUCT

    =SUMPRODUCT(--(Orders!A:A=A5), A5*Orders!B:B)

    Does that work for you?
    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

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Quote Originally Posted by Luther.King View Post
    =COUNTIF(Orders!A:A;A5)*( the cell to the right of the refered cell )


    Means, multiply with the values on the cell at the right of A5 match cells.
    Would that be
    =COUNTIF(Orders!A:A;A5)*(B5)

  4. #4
    Registered User
    Join Date
    03-15-2014
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    No because it's multiplying by 10, which is the value on Orders!B5 and for example on Orders!B8 i have again the referred COUNTIF A5 but now 5 items and the result it's 20, not 15.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Try
    =SUMIF(Orders!A:A;A5;Orders!B:B)

  6. #6
    Registered User
    Join Date
    03-15-2014
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    "The formula you type contains an error"

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Refresh your browser, I edited it to change a comma to a semicolon

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

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Did you try my formula

    =SUMPRODUCT(--(Orders!A:A=A5); A5*Orders!B:B)
    ?
    Can you upload an example of what you have and what you want result to be? (Go Advanced > Manage Attachments)

  9. #9
    Registered User
    Join Date
    03-15-2014
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Thank's Jonmo1, worked.

    I have another problem to solve, can i post it here or do i have to open another topic?

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    You're welcome

    I'd say go for another thread

  11. #11
    Registered User
    Join Date
    03-15-2014
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Ok, i'll open a new one.

    Once again thank's for help.

  12. #12
    Registered User
    Join Date
    03-15-2014
    Location
    portugal
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: If criteria match multiply one cell with the cell right next to one of the matched cri

    Hi Jonmo1.

    I posted my workbooks on this new thread.

    Can you take a look and tell me is it's possible to do what i intend to?

    Thank's in advance.


    http://www.excelforum.com/excel-form...t=#post3635967

+ 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. If criteria match, multiply then sum across multiply worksheets
    By ciayers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 02:20 PM
  2. [SOLVED] Copy adjacent cells based on matched cell criteria
    By asdfwqefwe3 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2013, 02:26 AM
  3. Multiply cell by a number dependent on criteria
    By allisonkristyne in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-31-2011, 08:07 PM
  4. Replies: 1
    Last Post: 05-12-2010, 01:34 PM
  5. multiply cell value by a number dependent on two criteria
    By podium123456 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-10-2007, 04:17 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