+ Reply to Thread
Results 1 to 4 of 4

Divide each column value by list of other values.

  1. #1
    Registered User
    Join Date
    08-03-2017
    Location
    Victoria, BC
    MS-Off Ver
    Office 2016
    Posts
    3

    Divide each column value by list of other values.

    Hi Everyone,

    I'm wondering if i can get some help wiring a formula for this: Basically i'm looking to have each column value divided by its unit price, and then the entire row summed up. I'm looking to do this with VLookups or Index/Match as the list of names and list of products could be infinitely large. I'd also like to avoid adding each column separately, because again, there could be infinitely many columns. Here's an picture of a really basic setup:

    Untitled.png

    If anyone has any tips for me or a place to start i'd be super appreciative!

    Thanks,

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Divide each column value by list of other values.

    Firstly, I have to ask: have you asked this question anywhere else? If so, don't forget you need to share cross-post links.

    Secondly, will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Divide each column value by list of other values.

    Try
    =iferror(sumproduct(index($b$2:$d$5,match($a8,$a$2:$a$5,0),)/sumifs($g$2:$g$5,$f$2:$f$5,$b$1:$d$1)),"")
    or
    =iferror(sumproduct(index($b$2:$d$5,match($a8,$a$2:$a$5,0),)/vlookup(t(if({1},$b$1:$d$1)),$f$2:$g$5,2,0)),"")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    08-03-2017
    Location
    Victoria, BC
    MS-Off Ver
    Office 2016
    Posts
    3

    Re: Divide each column value by list of other values.

    This did exactly what i needed it too, thank you so much!! Plus now i know about sumproduct, and that's great!! :D

+ 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. Replies: 16
    Last Post: 05-22-2019, 11:48 PM
  2. Search column, add the nth values, divide by nth values in sep. column
    By lorax1976 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2015, 06:51 AM
  3. Divide Single Row Date Values In Two Rows & Transfer Values
    By kopapa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2013, 03:38 PM
  4. Replies: 2
    Last Post: 10-25-2013, 07:01 PM
  5. Replies: 2
    Last Post: 03-22-2013, 07:42 AM
  6. Divide values in column by certain previous values
    By keis386 in forum Excel General
    Replies: 6
    Last Post: 04-17-2011, 05:17 PM
  7. Replies: 2
    Last Post: 03-14-2007, 01:20 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