+ Reply to Thread
Results 1 to 8 of 8

Calculate Cells based on information is other CELLS

  1. #1
    Registered User
    Join Date
    12-11-2019
    Location
    London
    MS-Off Ver
    2010 and 2016
    Posts
    3

    Calculate Cells based on information is other CELLS

    Hello Forum,

    I am new to the community and I look forward to hearing your expertise

    I need some assistance with the best way to implement the below query which has two parts, I will provide the data I am trying to manipulate as I think that will help me explain:

    Part 1

    DATA (contained/Found in Sheet 2)

    Animal Owner Cost
    Dog Theirs 100
    Dog Ours 150
    Cat Theirs 75
    Cat Ours 600
    Dog Ours 280

    The owner column effectively drives the +ve/-ve value of the cost column
    Theirs = positive (+100) Ours = Negative (-150)

    What is the best way to calculate a net amount for the Cost based on Animal? or return a net amount for each type of animal?

    PART 2
    On sheet 1, we will need to pull the net cost amount into the sheet based on the Animal, what is the most accurate way to achieve this?

    I am an intermediate Excel user and I have a grasp of EXCEL formulae and some VBA

    Thanks
    Attached Images Attached Images
    Last edited by WillGG41; 12-11-2019 at 09:08 AM. Reason: Add Sheet Sample

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

    Re: Calculate Cells based on information is other CELLS

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 pictures.

    Please read the yellow banner at the top of the screen. Act on its guidelines and post a SMALL sample sheet.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-11-2019
    Location
    London
    MS-Off Ver
    2010 and 2016
    Posts
    3

    Re: Calculate Cells based on information is other CELLS

    Hello Glen,

    I literally have nothing but an Idea and what was posted.

    Would a mock up Excel sheet suffice?

    Thanks

  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 2403
    Posts
    44,025

    Re: Calculate Cells based on information is other CELLS

    Of course!! That's perfect. No data protection issues!! Make sure you include your expected results, too.

  5. #5
    Registered User
    Join Date
    08-12-2019
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Calculate Cells based on information is other CELLS

    Hello Will,

    You can make a dummy data sheet and an outcome sheet, where you do the calculations manually (how you would like it to look).
    From there its easier for us, to create a formula that does exactly that.

  6. #6
    Registered User
    Join Date
    08-12-2019
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Calculate Cells based on information is other CELLS

    Hello Will,

    You can use this formula to create the negative number.

    =IF(B2="Theirs";C2;C2-(C2*2))

    Total is a sum if this column.

    Getting the sum based on "animal" you can use:
    =SUMIF(A2:D6;F2;D2:D6)

    And lastly, to pull data based on the animal you type:
    =VLOOKUP(F6;F2:G3;2;FALSE)
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-11-2019
    Location
    London
    MS-Off Ver
    2010 and 2016
    Posts
    3

    Re: Calculate Cells based on information is other CELLS

    Thanks Bassehave

    To give you more information - I am trying to manipulate data received from our accountancy and we are trying to get the net cost of looking after/ providing pets.

    I have provided a skeletal template of how we receive data (usually contains over 600 lines, 26 columns) and we cannot amend the source file

    So, I updated the sheet to better reflect this, for the amount of rows that contain ('Dog' Col. A) I need it to run through each line, take into consideration the direction (ours/theirs. Col. D)
    and correctly reflect the right amount (Col. E i.e. -/+) then sum these (Net amount) and return to Ark1 C14 for DOG
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-12-2019
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Calculate Cells based on information is other CELLS

    Hello Will,

    Can you use this? Put in C14 and pull down.

    =SUMIFS(Sheet1!$E:$E;Sheet1!$A:$A;A14;Sheet1!$D:$D;"Theirs")+((SUMIFS(Sheet1!$E:$E;Sheet1!$A:$A;A14;Sheet1!$D:$D;"Ours")*-1))
    Last edited by Bassehave; 12-12-2019 at 06:05 AM.

+ 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: 1
    Last Post: 09-06-2019, 11:37 PM
  2. Replies: 3
    Last Post: 05-15-2017, 03:24 PM
  3. Formula to pull information based on information in different cells.
    By apmi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-26-2014, 03:57 PM
  4. Multiply two cells based on information in two other cells
    By stanster in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-15-2012, 10:04 AM
  5. Macro to Calculate Column Cells based on evaluating other cells in same Row
    By Eldorren in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2012, 07:59 AM
  6. Copying cells based on another cells information
    By stuckwithexcel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2009, 04:10 PM
  7. HOW DO I HAVE A CELL DISPLAY INFORMATION BASED ON 2 OTHER CELLS
    By CC in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Tags for this Thread

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