+ Reply to Thread
Results 1 to 6 of 6

Find a value in a table given a specific customer reference.

  1. #1
    Registered User
    Join Date
    01-20-2021
    Location
    Seattle, WA
    MS-Off Ver
    Office 365
    Posts
    4

    Find a value in a table given a specific customer reference.

    I am trying to put a formula into a sheet that is pulling data from another sheet within the same workbook. Ultimately, I am trying to calculate the gross margin based on a specific customer. The sheet I am putting the formula into has a cell with a customer name in it that can be changed to various customers. I need the formula to review the data sheet, find this customer from a specific column, and then calculate the gross margin based on that.

    I can calculate the total margin of all customers easily, but I need it to calculate it based on specific customers.

    My existing formula is:
    =SUMIF('Install Log'!E4:E1000,C4)*'Install Log'!AL4:AL1000/'Install Log'!D4:D1000

    1) Install Log E4:E1000 = the range on the data spreadsheet that has various customer names
    2) C4 = the location on the other spreadsheet where the customer name can be input
    3) the remaining part of the formula is the calculation of Gross margin (sum of all Profits/sum of all revenue)

    Any help would be appreciated. Thanks!
    Last edited by Richard Buttrey; 01-20-2021 at 11:30 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Can't figure out formula

    Unfortunately your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    Since you're a newcomer I'll change the title on this occasion but please note for the future.

    This will require a VLOOKUP() or perhaps a INDEX() MATCH() combination.
    Last edited by Richard Buttrey; 01-20-2021 at 11:31 AM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-20-2021
    Location
    Seattle, WA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Find a value in a table given a specific customer reference.

    Thank you Richard. I will be more aware of that when I post again.

    Do you have any recommendations on the formula? When I used Vlookup to identify the customer, how then do I take the sum of a column and divide it by another sum of a Column to show the results only for that specific customer identified?
    Last edited by Hitman51; 01-20-2021 at 11:59 AM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find a value in a table given a specific customer reference.

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.

  5. #5
    Registered User
    Join Date
    01-20-2021
    Location
    Seattle, WA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Find a value in a table given a specific customer reference.

    I have attached a simple file to show what I am trying to do. In the Margin tab, I am trying to calculate the gross margin based on the info for that customer in the data tab (all values related to that customer in Profit Column/all values related to that customer in the revenue column).
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-20-2021
    Location
    Seattle, WA
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Find a value in a table given a specific customer reference.

    After much trial and error, I was able to solve the issue. The formula that I used was as follows (using the spreadsheet uploaded for the example).

    =XLOOKUP(B1,Data!A2:A11,Data!C2:C11)/XLOOKUP(B1,Data!A2:A11,Data!B2:B11)

+ 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. VBA: Show Subtracted Figure In Cell When Cumulative Figure Is Entered
    By hrayani in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2018, 11:29 AM
  2. [SOLVED] Using Linear Regression to predict a future event / performance figure / speed figure
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-22-2017, 11:51 AM
  3. Replies: 1
    Last Post: 06-22-2017, 02:58 AM
  4. Replies: 4
    Last Post: 02-03-2014, 08:05 AM
  5. Sum formula to exclude monthly budget figure when actual figure is entered
    By rocketmail in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2013, 04:22 AM
  6. Cross Reference to a Figure actually showing figure, not just caption
    By mgaworecki in forum Word Formatting & General
    Replies: 2
    Last Post: 02-23-2012, 10:53 AM
  7. Calculating monthly sales figure required to make annual turnover figure
    By CatIsoSio Sky in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2010, 04:42 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