I have an excel sheet which contains 4 years data of schools. The data set contains school scores. Old schools have data for 3 or 4 years of data while new schools have only 1 or 2 years of data.
I have a column in my data set which represents the unique school ID's. Based on these school ID's I want to generate a column "Occurrence" which represents the number of times each unique id occurred in the data set. I am attaching a picture which shows clearly what I want to have in the occurrence column by using formula.
In G2 use:
=IF(COUNTIF(B$2:B2,B2)=1,COUNTIF(B:B,B2),"")
Drag down.
Related
Does anyone have an idea how to solve this problem using Excel? I have this table. As you can see there is false information in the data, as the "Customer_since" column has different values for the same customer (column "cust_id"). "Customer since" column defines the year of the customer's first purchase. Here is the table:
In fact, the year of the first purchase must be the same in all rows for the same client. In my solution, I would like to keep the earliest year (of the first purchase) for all clients. As you can see one client can appear in many rows, for example, client 275250 had 8 purchases (means 8 rows in a data set) and client 275246 had only 4 purchases. I cannot change it manually as the data set contains over 7000 rows. The desired solution would be to get the same year of their first purchase for the same customer in all rows (for example, correct data is for 275252 and 275233 customers).
MINIFS will get you there. https://support.microsoft.com/en-us/office/minifs-function-6ca1ddaa-079b-4e74-80cc-72eef32e6599
Below, I'm using formula =MINIFS(C:C,B:B,B2) where C:C would be the range of your transaction dates, B:B is the range of customer IDs, and B2 is the current customer ID.
I would do the following:
Create a new table with unique cust_id and the corresponding min(Customer_since). A PivotTable would do it easily.
Change the column Customer_since to use XLOOKUP() to find the correct value on the new table.
If needed, you can do it on another worksheet and Paste Values back into this.
I am working with two spreadsheets. Spreadsheet “A” contains data with dates, and an ID number. Spreadsheet “B” contains data with dates and an ID number.
I want to cross reference spreadsheet “A” ID number with spreadsheet “B” ID number. If the ID number in “A” appears in “B”, I want to use that entry and filter by its appearance 12 and 24 months after that date.
I know this reads as very confusing. I am having a difficult time figuring out the best way to do this. I’m working a dataset that has ten of thousands of rows and another spreadsheet with million plus rows.
I have tried to use this formula =IF(ISERROR(MATCH(Y2,$AA$2:$AA$12316,0)),"No","Yes") to filter out if a data is in an array in a column next to it. I pasted data from spreadsheet "b" into spreadsheet "a".
I am now stuck because I need to have another layer of analysis by the number of months after the date.
Any help if appreciated. Thanks for reading.
need some help on my excel production report.
I want to Lookup for the daily unique ID, gram and pieces from Sheet 1 into Sheet 2.
The daily unique ID consists of up to 5 categories.
Each day, there could be up to a maximum of 3 unique ID produced with each one having different categories (some have 2 same categories with different grams and pieces. It need to be shown in a separate column in Sheet 2), grams and pieces.
I came out with an excel formula but it only works IF there is only one daily unique ID per day. If there is more than one unique ID, this formula fails as it only captures the first one.
Please see my formula below
I2:I100 is the gram in Sheet 1
E2:E100 is the "unique code-category" in Sheet 1
D11 is the unique code in Sheet 2
P11 is the type of categories
{=IFERROR(INDEX('A'!$I$2:$I$100,SMALL(IF(($D$11&"-"&$P$11)='A'!$E$2:$E$100,MATCH(ROW('A'!$E$2:$E$100),ROW('A'!$E$2:$E$100)),""),ROWS($A$1:$A1))),"")}
Is there a way I could capture everything?
Can I do it with excel formula or a VBA is required?
I have tried many different formulas but nothing came out right, please help :(
Please let me know if my explanation isn't clear. Thanks.
Sheet 1
Sheet 2 (Final Report)
I have two excel sheets, One numeric and another text.
Numeric and text sheet has 5 observations and the first column is country. Data dictionary for country is 1='US', 2='Germany',3='India',4='China'.
I am looking for a VBA code that can compare values between two sheets based on data dictionary codes. Also the country column shouldn't have any data other than what is available in data dictionary. In this example, there is also an option 5 that is not available in dictionary and this needs to be highlighted as error.
Sheet1: Numeric Sheet2: Text
Country Country
1 US
1 US
2 Germany
3 India
4 China
5 China
As suggested in one of the comment maintain two consecutive columns in any sheet, first one with the country code and other one with the corresponding country name. then use can use vlookup() function to get the the country name... for ref click here
This question already has answers here:
Two column lookup in table array using INDEX and MATCH
(2 answers)
Vlookup using 2 columns to reference another
(2 answers)
Closed 5 years ago.
I have a tab in excel with employee details. Column B is first name, column C is last name,Column H is their employment status ( LEFT, EMPLOYED ETC)
I want a formula in next tab to fetch the data of column H of a given name i want to search for.
Lets say in the 2nd tab, i put name John Doe, Sam Bravo, Leah Casey and another 25 names. On the right handside cells of each name i entered, i need the employment status to appear. I have a database of 18000+ employees. So a formula for this will help a lot. Many thanks.