Key words and sum equations - excel

Sample Page I have a spreadsheet That I am having trouble getting a formula running.
I have a table that has a handful of columns, being brand, description and sales.
I need to get a formula that will automatically find a keyword in column A and B and SUM all the totals to transfer to another worksheet.
Example I have 2 similar products by name, Demo Firm, and Demo Soft. I have them sorted into text to columns to make it easier to search. Demo in the 1st Column, Firm in the 2nd, Sales in the 3rd.
I need to be able to search all of column A and find every word "DEMO", then I need the formula to Search Colum B and Find all the "Firm", finally I need it to sum up the totals of Column 3 of "DEMO FIRM" and place the sum into Column4.
I have tried IFSUM, IFSUMS, and DSUM but I think I am missing one little step.
I hope this makes sense, in my head I know what I want to do, explaining it is difficult.
Thanks for your help. Will keep an eye on my email if further info needed.
I have uploaded an image of what I am needing (SAMPLE PAGE at top of post). The formula that was commented worked for a my small sample. I just need to make sure it will work on an ever changing spreadsheet.

If it is assumed that your data fills rows 2-10, i.e. A2:A10, etc., but obviously this can be changed as needed. As I understand it, you want to sum up all sales into Column D, based on the values in Column A and Column B. You can simply use a SUMIFS formula in Column D, in this case D2 and drag down for all rows, as follows:
=SUMIFS($C$2:$C$10, $A$2:$A$10, A2, $B$2:$B$10, B2)
So if A2 contains DEMO and B2 contains FIRM, then this formula will sum all of the sales totals in Column C where Column A contains DEMO and Column B contains FIRM.

Related

If cell contains text from a range of other cells

I am working on a project where the aim is to categorize spending on bank statements based on their description. Bank statements are uploaded onto an excel spreadsheet each month, which then should look at the description of each spend and assign it to a category.
There are 75 spend categories listed out in a row, and under each category there is a list of text against which the description of the spends on the bank statement needs to be matched. If the description contains text from a cell, the function should say which category that particular cell is under.
$K$3:$CG$3 is where I have the names of the categories
$K$4:$CG$502 is where I have the list of all the identifying text for each of the categories
C is the column in which the descriptions from the bank statements are
I have come up with the below formula, which works fine however if I expand it to the full range of identifiers (replace $K$4:$CG$4with $K$4:$CG$502 in SEARCH function) it fails.
={INDEX($K$3:$CG$3,1,MATCH(TRUE,ISNUMBER(SEARCH($K$4:$CG$4,C6)),0))}
Any help is much appreciated.
The table is found on this link. Column D is the expected outcome once the SEARCH function is expanded as in Column E, which currently arrives to N/A. "nnnnn" values in columns K to CG are dummy values and will be populated by users.
Using INDEX(), AGGREGATE() & COLUMN() Function, you may try this formula,
• Formula in cell D3
=INDEX($K$3:$CG$3,
AGGREGATE(15,6,(COLUMN(Control!$K$4:$CG$502)-COLUMN(Control!$K$4)+1)/
(ISNUMBER(SEARCH(Control!$K$4:$CG$502,C3))),1))
And Fill Down! Workbook_Link

Updating Price List in Excel with vlookup or Index/Match

I'm a book wholesaler and need to update my price and stock list constantly to share with some customers in excel format; also to use in importing to websites.
As in the image above, what I need is a formula for Column D to search for SKU in C2 in A-column for an exact match; return the value from B to the corresponding cell in D column.
I have searched countless topics, even found a solution in previous weeks but every time I use the same formula I get N/A or REF error.
TIA
Welcome to SO. Yor formula is good, but you are mixing numbers with text. In column A, the codes you are listing are stored as TEXT (note that they are left aligned inside cell), but the values you have in column C are stored as NUMBERS (note that they are right aligned insided cell). So Excel is looking for that NUMBER, but it finds no NUMBER in column A that matches, and returns N/A.
So before searching, let's convert the number in column C to a text, and let's see what happens. Try something like this:
=VLOOKUP(TEXT(C2;"#");$A$2:$B$2349;2;FALSE)
Hope you can adapt this to your needs.

Excel: Combine =vlookup and =countif

For my question I am trying to reduce a very large amount of data using the =countif function in regards to a specific Employee ID (using =vlookup).
In Column 'A' I have every employee ID listed only once. In columns B, C, D, E, and F I would like to count every time that employee has been Hired, Promoted, received a Pay Increase, been Demoted and Fired, respectively.
In Column 'I,' I have again a list of employee ID's and in 'J' each time one of those actions were implemented.
Since there are more than 10,000 employee iterations that exist in column 'I' this is why I am trying to condense these down to numeric values in columns B:F.
ACTUAL QUESTION: Is there anyway to 'nest' these two functions in order to get the required results that I want?
Thanks in advance.
You can use Countifs with multiple conditions (not Countif, which takes only one condition)
Consider the following screenshot. The formula in cell B2 is
=COUNTIFS($I:$I,$A2,$J:$J,B$1)
Copy across and down. Note the position of the $ signs. They are important. The column references for columns I and J are absolute, and will not change when the formula is copied across. The reference to $A2 will always refer to column A, but the row will adjust when copied down. The reference to B$1 will always refer to row 1, but the column will adjust when the formula is copied across.
You can do a similar thing without any formulas at all, using a pivot table. Click a cell anywhere in the data in columns I or J, then click Insert > Pivot Table. In the pivot table pane that appears on the right, drag the Employee ID to the Rows area, drag the action to the Columns area and drag either of the fields to the Values area. The result looks like this:
Look Ma, no formulas!!

Excel: Return Multiple Items with One Lookup Value but on a different sheet

My formula works, but only if its in the same page, and along the same rows
Formula:
=(INDEX($C$1:$D$4,SMALL(IF($C$1:$C$4=$F$2,ROW($C$1:$C$4)),COLUMNS(D1:D4)),2))
Note: Column G has the formula, what it does it look for value in F2 (which is 1.2) within the columns of C & D, and extracts the respective data in column D. So in this case, it would extract the data in column G.
Question: Now what do I do if I want this to occur from different sheets, or even different workbooks? I need to do this exact same thing, extract the data that is in column c and d (which is on a different workbook) to my workbook.
Every time I try, I get a value error.
Bonus: I'm also trying to get the date that is closest to today's date, I have this formula here:
=IF(COUNT(G2:G5)>0,INDEX(G2:G5,MATCH(MIN(ABS(G2:G5-$D10)),ABS(G2:G5-$D10),0)),"")
Where D10 is just equal to =TODAY() and this entire formula works by pressing ctrl+shift+enter
If you can also include this into the formula so that it just spits out the closest date in G2 rather than spit out all the dates. But it is not necessary, just helps a lot.
For your "Closest to today problem", I was trying to spread the difference of the date or a comparison of the date just like in your example. This is just not working out. I solved the problem by adding another column. I do not know if this is a valid option for you or not, but here is what I have. Assuming H is available or you can insert a new column H. use this dragged down for each row - in your exampl 2 thorugh 5.
=ABS(D$10-G2)
Then add this in H10 or wherever you see fit
=D10-(MIN(H2:H5))
Here is an excel-ish example
5/12/2014 =ABS(D$10-G2)
5/13/2015 =ABS(D$10-G3)
5/14/2014 =ABS(D$10-G4)
5/15/2014 =ABS(D$10-G5)
6/6/2016 =D10-(MIN(H2:H5))

INDEX&MATCH excel on rows and return SUMPRODUCT

I needed some help with Excel functions as I am not really sure how to achieve this.
Basically, this picture shows my data structure:
I am aware that I can use Index& Match excel functions together for columns but I am not sure if it is possible use Index&Match together on two row conditions.
Requirement:
I have three products, product A, product B and Product C. I want to be able to quickly calculate the actual revenue and and you can see the data structure in the image above. My top-most row is month. For each month, I have 4 columns, of which 2 need to be calculated should the condition match.
This is the condition. An example, for product A, calculate the total sumproduct(multiples column actual customers x Price Actuals) for yearMonth 201501.
So basically,first, for product A, it would need to find YearMonth 201501, and when it is found, it should find columns Actual Customers and Price Actuals and return the SUMPRODUCT of Actual Customers and Price Actuals.
Is it possible to do this?
I have searched the Internet a bit and I have not found a solution.
Update:I thought I could post the follow-up question in the same thread insted of Cristiano duplicates... For the accepted answer, in the excel formula, how can it be divided by the total amount of "actual customers" for that month?
Simply adding "actual customers" with a slash before IT does not work.
You need a cell where you specify the month you want to look up. Give that cell the name "TheMonth".
You need a cell where you specify the product you want to look up. Give that cell the name "TheProduct".
Then, assuming your screenshot starts in cell A1, you can use
=SUMPRODUCT($B$3:$I$5*($B$1:$I$1=TheMonth)*(($B$2:$I$2="Actual Customers")+($B$2:$I$2="Price - Actuals"))*($A$3:$A$5=TheProduct))
Next time, please post a link to a workbook. It's not much fun typing in the text and numbers from a screenshot in order to verify a formula.
Here is the workbook with the formula in action.

Resources