Top Sales Problem

Use a two-dimensional array, two For-Next structures, and an If statement to determine which salesperson had the most sales. Display the name of the person with the highest sales total. Use the table below to enter the 5 names and sales amounts into columns A and B of the spreadsheet, then use the data to fill a two-dimensional string array. See screen-shots page.

Last Name

Sales

Jones

1402

Smith

2301

Frank

231

Able

6762

Zean

199

Create a flowchart and VBA code to solve this problem. Create a command button on the spreadsheet named cmdTopSales. Place the code under the Click event of a command button titled “Top Sales”.

Flowchart Solution

Sample Screen Shots

VBA Solution Code