+ Reply to Thread
Results 1 to 3 of 3

Auto substract by comparing the category

Hybrid View

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    11

    Auto substract by comparing the category

    I am having two sheets .Sheet one contains the following data

    category Total amount Remaining
    category1 1000
    category2 2500
    category3 600
    category4 9000

    Sheet2 having

    Name category Final
    suresh category1 500
    ravi category2
    rajesh category3
    ramesh category4

    If i enter 500 in final for category1 then ,my formula should do

    Search for the category in sheet1 so now category is category1 so ,I have to populate

    totalamount-final=500 in remaining of category column1 in sheet1.
    please try to helpExample2.xlsx

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Auto substract by comparing the category

    Hi,

    (maybe) in Sheet1 in C2 and down:

    =B2-SUMIF(Sheet2!B:B,A2,Sheet2!C:C)
    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    02-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Auto substract by comparing the category

    Hi CANAPONE,
    Thanks a lot for your promt solving the thread.
    I have a small problem.
    If category was not there and assigned and then we should get 0 (i.e if i assign a category5 in sheet2 and assign amount and if it was not) there.,in the same column or other column and if total money was zero after assigning to some users
    is there any possibility of throwing error or populating other column with some error text .

    Thanks in advance
    Last edited by expert40; 02-12-2012 at 06:59 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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