How to change value of field based on values of two other fields in Excel or Google Sheets - excel

I'm trying to create a customized personal expense report on Google sheets . If anyone has suggestions for a better approach, I'm open to to ideas!
In one column Category, I have option to select category with a drop down - Restaurants, Rent, Electricity etc. The column Value on the next to it holds the an integer value.
On a the same sheet, I have a column where all categories are defined. In the column Limit next to it, is the maximum integer value for each category. The next column Balance holds the remaining value (Limit - Sum of all Value matching Category)
My question is - when I add an entry in sheet 1 for any category with a value, how do I subtract the Value added from the respective Category to show the remaining balance from Limit in Balance column? As I keep adding items, the Balance field should get updated.
TABLE 1
Item Category Value
i1 Rest 100
i2 Rent 50
..
..
TABLE 2 (In same sheet somewhere adjacent to the above table)
Category Limit Balance
Rest 500 400
Rent 1000 950
..
..

Try using this:
=IFNA([limitcellname]-SUMIF([rangeofcategories],[categorycellname],[expensevaluerange]),[limitcellname])
Range of categories = column where all categories are listed in the expenses table. E.g- B:B if B column has expense categories
expense value range = column where all expenses are listed in the expenses table. E.g- C:C if expenses values are in C column
category cell name is the category cell in the balance table
limit cell name is the limit cell
This should work for your purposes

Related

Copy entire rows that has unique value on Excel

I have a table with several rows which may contain an equal value (specifically the product code) I have to create another table with a summary of the quantities of the products, so for example, if I have 3 identical products in table 1, in the summary table I only need to have one time that product code with a column that will show me quantity = 3 and the other columns must be filled in with the other product information, on google sheet I managed to do it with this formula: =unique(query(scan!b5:j,"select b,c,d,e,f,g,h",1))
EXAMPLE
how do I do this with excel functions?

Excel formula to sum a column if there are duplicated in one column and if there is specific text in another column

I could use some guidance on what an excel formula would look like if I wanted to sum values in one column if duplicated cells exist in another column as well as specific text in another column. In the example below, I want to sum Column C if Column A has duplicated cells and Column B has the text "Income" and "Special Cash."
Column A Column B Column C
Row 1) BGIO US Equity Income 0.05
Row 2) BGIO US Equity Short Term Cap Gain 0.009573
Row 3) BGIO US Equity Special Cash 0.00931
I would also like to concatenate Column B if the rates are summed. In the end, I am hoping to end up with the results below where Row 1 and Row 2 meet these criteria:
Column A Column B Column C
Row 1) BGIO US Equity Income + Special Cash 0.05931
Row 2) BGIO US Equity Short Term Cap Gain 0.009573
Any feedback is very much appreciated!
If you have your data in a table, you can load it into the Power Query editor by clicking on the table and choosing From Table under the Data tab.
Create a custom column that you will group by. (Custom Column under Add Column tab.)
Now Group By (Home tab) Deal and Group and aggregate over Amount.
This should be the result set that you want. You can now Close and Load the transformed table into your workbook.

Excel: Index match if date matches month?

I have two excel sheets:
Data:
Column A Column E
01/01/2017 Supplier 1
05/01/2017 Supplier 2
05/01/2017 Supplier 1
Sheet 2:
I am trying to look up the supplier where the month of the date in column A matches the month number in cell F11.
F11 = 1
=IF(ISERROR(INDEX(Data!$A:$I,SMALL(IF(MONTH(Data!A:A)=$F$11,ROW(Data!$A:$A)),ROW(1:1)),5)),"",INDEX(Data!$A:$I,SMALL(IF(MONTH(Data!A:A)=$F$11,ROW(Data!$A:$A)),ROW(1:1)),5))
For some reason this doesn't work and i get no result.
I also need to only list each supplier name the once, unique values. But i believe my formula gives me the same result twice.
Please can someone show me where i am going wrong?
Can't you do this with a pivot table?
Just drag the date field into the columns box, then right-click, choose 'Group' and choose 'months'. Then drag the supplier field underneath it and you should get a list of all unique suppliers by month.
Edit:
Example below.

Excel Sum Based on Selection of Item List

**My excel sheet lists County's and its tax rate.
At the end of the month, I have to document the sales tax of each sale.
I have 3 columns that looks something like this:
Column A is Select a County (This is created in the form of a drop-down list)
Column B is the selection from column A's rate
Column C is Sale Contract Number
Column D is the amount of sales tax column C was
How can I create a sum for a given county (Column A) using the monetary values in Column D?
I already tried //=SUMIFS(A:A, D:D, "=Albany")//
but that didn't do the trick
I want to calculate the total sales tax for every county once I completed the list. County's are selected via a drop-down list, and sales tax (column D) are manually entered.
Any suggestions?**

How to calculate with reference id

I have a workbook in which there is stock detail on sheet 1 and sales detail on sheet 2.
I want to auto-calculate the remaining stock. But the sales inventory is based on dates so all the different products are mixed up. Every product has a unique ID. So how I can subtract the sale product from stock based on their IDs?
An example:
The customer comes and buy 4 shirts.
I enter the product with product ID, and in the Qty column I added 4.
Now I want to minus 4 from actual stock.
How it can be done in Excel?
You need to take the sum of all sold products in sheet 2 based on condition that productID in sheet2 equals our interesting product in sheet1. Use:
=SUMIFS(B2:B100,A2:A100,productID)
where column A contains product IDs and column B contains "sold" values.
Then subtract that sum from the stock total in sheet1, e.g:
=B3-(SUMIFS(Sheet2!B1:B100;Sheet2!A1:A100;A3))
where column A contains product IDs and column B includes stock totals.
(note how "productID" from the first expression is here replaced with "A3", i.e. the value of productID column for the current row).
Copying this last formula to other product rows should automatically update the relevant values.

Resources