0% found this document useful (0 votes)
20 views

Excel Assignment

The document discusses various Excel functions like COUNTIF, VLOOKUP, SUMIF, TEXT and CONCAT. It provides explanations and examples of how to use these functions to count cells based on criteria, lookup values in a table, sum values based on criteria, format dates and times, and merge dates and times into a single value.

Uploaded by

Nihal Koche
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Excel Assignment

The document discusses various Excel functions like COUNTIF, VLOOKUP, SUMIF, TEXT and CONCAT. It provides explanations and examples of how to use these functions to count cells based on criteria, lookup values in a table, sum values based on criteria, format dates and times, and merge dates and times into a single value.

Uploaded by

Nihal Koche
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Q 1 - How to use the COUNTIF Function in Excel?

Ans – I have explained this formula from point to point, which you have seen given below

(1) COUNTIF: This is an Excel function that counts the number of cells within a range that meet
the given condition.
(2) In Excel, the dollar sign $ is used for absolute cell references.
(3) When the $ is before both the column letter and the row number (like $C$4:$D$21), both
the column and row references are fixed.
(4) $C$4:$D$21: This is the range of cells that the formula will look at. The dollar signs $ in front
of the column letters and row numbers make this an absolute reference, which means no
matter where you copy this formula, it will always refer to the cells from C4 to D21.
(5) F5: This is the criteria that the COUNTIF function will use to count cells. The function will
count the number of cells in the range $C$4:$D$21 that are equal to the value in cell F5.

Q2 - How to Separate Data in Excel?

Ans – Sure, here are the steps to separate the data using the Text to Columns feature in Excel:
1. Select the Data: Click and drag to select the cells that contain the data you want to
split12.
2. Open Text to Columns: Go to the Data tab on the Ribbon, and click on "Text to
Columns"12.
3. Choose Delimited: In the Convert Text to Columns Wizard that appears, choose
“Delimited” and click Next12.
4. Select Delimiters: Choose the delimiters for your data. For example, if your data is
separated by spaces, check the box for “Space”. You can see a preview of your data in
the Data preview window12.
5. Choose Destination: Select the destination in your worksheet where you want the
split data to appear. Make sure you have multiple empty columns on the right side of
your original data. Splitting text will overwrite any data to the right of the source data

Q – 3 - How to use the VLOOKUP function with auto-update (data validation for names)
on the following data?"

 Ans - The formula =VLOOKUP($H$5,C4:E10,MATCH(I4,$C$4:$E$4,0),0) is used to


look up and return a score for a given name and subject from the table in C4:E10.
 The VLOOKUP function takes four arguments: lookup_value, table_array,
col_index_num, and range_lookup.
 The lookup_value is $H$5, which is the cell where you enter the name of the student
you want to find the score for. The dollar signs make the reference absolute, so it will
not change when you copy the formula to other cells.
 The table_array is C4:E10, which is the range of cells that contains the names and
scores of the students. The first column of this range (C4:C10) must contain the names
that match the lookup_value.
 The col_index_num is MATCH(I4,$C$4:$E$4,0), which is another function that returns
the position of an item in an array. The MATCH function takes three arguments:
lookup_value, lookup_array, and match_type.
 The lookup_value is I4, which is the cell where you enter the subject (English or Hindi)
you want to find the score for.
 The lookup_array is $C$4:$E$4, which is the range of cells that contains the headers of
the table. The MATCH function will return the number of the column that contains the
subject in I4. For example, if I4 is “English”, the MATCH function will return 2,
because “English” is in the second column of the lookup_array.
 The match_type is 0, which means an exact match is required. The MATCH function
will only return a value if the lookup_value is exactly equal to one of the values in the
lookup_array.
 The range_lookup is 0, which means an exact match is also required for the VLOOKUP
function. The VLOOKUP function will only return a value if the lookup_value is
exactly equal to one of the values in the first column of the table_array. If not, it will
return an #N/A error.
 The VLOOKUP function returns the value in the row that matches the lookup_value,
and the column that matches the col_index_num. For example, if H5 is “Ritika” and I4
is “English”, the VLOOKUP function will return 90, which is the score of Ritika in
English.
 To apply data validation with a word limit of 3-7 characters for the name cell, you need
to follow these steps:
 Select the cell H5, where you want to enter the name.
 Go to the Data tab and click Data Validation in the Data Tools group.
 On the Settings tab of the Data Validation dialog box, choose Text Length from the
Allow drop-down list.
 In the Data drop-down list, choose between.
 In the Minimum and Maximum boxes, enter 3 and 7, respectively. This will restrict the
name to be between 3 and 7 characters long.
 Optionally, you can add an input message and an error alert on the Input Message and
Error Alert tabs of the Data Validation dialog box. The input message will appear when
you select the cell, and the error alert will appear when you enter an invalid name.
 Click OK to apply the data validation rule to the cell.

Q - 4"How to use the SUMIF function with auto-update (data validation for names)
on the following data?"
 Ans - The formula =SUMIF($E$5:$E$19,J4,$F$5:$F$19) is used to calculate the
total sales for a given city from the table in E5:F19.
 The SUMIF function takes three arguments: range, criteria, and sum_range.
 The range is $E$5:$E$19, which is the range of cells that contains the city names. The
dollar signs make the references absolute, so they will not change when you copy the
formula to other cells.
 The criteria is J4, which is the cell where you enter the name of the city you want to
find the total sales for.
 The sum_range is $F$5:$F$19, which is the range of cells that contains the sales
figures. The dollar signs make the references absolute, so they will not change when
you copy the formula to other cells.
 The SUMIF function sums all the sales figures ($F$5:$F$19) where the
corresponding city name ($E$5:$E$19) matches the criteria in cell J4.
 For example, if J4 is “Nagpur”, the SUMIF function will return 2958, which is the
sum of 986, 986, and 986.
 To apply data validation with a dropdown list of cities for the criteria cell, using
below this formula because city names are repeating
let’s break down the formula =OFFSET('Questions 4'!
$E$5,0,0,COUNTA(UNIQUE('Questions 4'!$E$5:$E$19)),1):
1. OFFSET: The OFFSET function in Excel returns a reference to a range that is offset
from a given cell or range by a specified number of rows and columns1.
2. ‘Questions 4’!$E$5: This is the starting point of the range. The dollar signs in the cell
references mean that they are absolute references, so if you copy the formula to
another cell, these references will not change1.
3. 0,0: These two zeros indicate that we’re not offsetting any rows or columns from the
starting point1.
4. COUNTA(UNIQUE(‘Questions 4’!$E$5:$E$19)): This counts the number of
unique values in the range ‘Questions 4’!$E$5:$E$19, and this count determines the
number of rows in the dynamic range. Please note that the UNIQUE function is
available in Excel 365 and Excel 2019. If you’re using an older version of Excel, you
might need to use a different approach to count the unique values.
5. 1: This indicates that the dynamic range should be 1 column wide
6. And this formula apply in name manger to create Reference Range to create data
validation list

Q – 5 "What function merges the current date and time?"


text(d5,"dd/mm/yyyy"): This part of the formula is using the TEXT function in
Excel. The TEXT function lets you change the way a numeric or date/time value is
displayed by applying formatting to it. In this case, it’s taking the value in cell D5 and
formatting it as a date in “dd/mm/yyyy” format. For example, if D5 was the date
“2024-03-08”, it would become “08/03/2024”.
text(e5,"mm:am/pm"): This is doing something similar to the first part, but for the
value in cell E5. It’s taking that value and formatting it as a time in “mm:am/pm”
format. For example, if E5 was the time “14:09”, it would become “09:PM”.
=concat(...): The CONCAT function in Excel combines two or more text strings into
one. So, this formula is combining the formatted date from D5 and the formatted time
from E5 into a single text string.
So, if D5 was “2024-03-08” and E5 was “14:09”, the result of the formula would be
“08/03/2024 09:PM”. Note that there is a space between the date and time, which is
added implicitly by the CONCAT function. If you want to remove this space or add a
different separator, you can modify the formula like so:
=concat(text(d5,"dd/mm/yyyy"), "-", text(E5,"mm:am/pm")). This would result in
“08/03/2024-09:PM”.

You might also like