0% found this document useful (0 votes)
27 views1 page

Excel Analytics and Programming - Assignment 2: ND ND

The document provides instructions for an Excel assignment to analyze participant responses from a fair about favorite music groups. Participants may have entered the same group with variations in case or spacing. The assignment is to write VBA code to create a sorted tally table that counts the distinct entries while ignoring formatting variations and displays the full text from column A. Useful string functions for the task include concatenation, length, find, split, mid, left, right, and trim.

Uploaded by

Wr Ar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Excel Analytics and Programming - Assignment 2: ND ND

The document provides instructions for an Excel assignment to analyze participant responses from a fair about favorite music groups. Participants may have entered the same group with variations in case or spacing. The assignment is to write VBA code to create a sorted tally table that counts the distinct entries while ignoring formatting variations and displays the full text from column A. Useful string functions for the task include concatenation, length, find, split, mid, left, right, and trim.

Uploaded by

Wr Ar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Excel Analytics and Programming Assignment 2

At a fair, the participants were asked to list their favorite music groups. Afterwards, all of the responses were typed up onto column A in an Excel worksheet. Participants may have used different cases of letters or added spaces between the words, but they refer to same entry. For example, the following entries should all be treated the same: Coldplay, ColdPlay, Cold play, c o Ld p lAy Write the codes in VBA that will create a sorted tally table that displays the distinct entries with their count in the dataset. When numerous formats of the same entry appear, any variety of it can appear in the tallied table. Make sure that the entire text in column A will be displayed. The table to the left is an example of the original data inputted. The table to the right is the corresponding desired output.

Some potentially useful string functions: Concatenation & Length To join Hi and class with a space between: hi & & class Len(hello) will return 5 Find InStr("abcdefg", "cd") returns the index at which cd first appears, which is 3 InStr("abcdefg", "x") returns 0 as x is not found in the string InStr(3, "ababcd", "b") finds the index of the first instance of b starting at index 3, which is 4 Split Mid("ABCDEF", 2) returns the substring from the 2nd entry until the end, which is BCDEF Mid("ABCDEF", 2, 3) returns the substring from the 2nd entry, of length 3, which is BCD Left("abcdefg", 4) returns the first 4 characters of the string, which is abcd Right("abcdefg", 4) returns the last 4 characters of the string, which is defg Trim(abc ) gets rid of the extra spaces at the end and returns abc

You might also like