Purchase Solution

Using Loops and String Arrays in Excel

Not what you're looking for?

Ask Custom Question

I have an assignment due and am having issues with the first part (which is needed to do all of the other parts). I have the following VBA code written:
Private Sub DisplayData(strArray() As String)
Dim intFriend As Integer
For intFriend = 1 To mintNumFriends
Cells(intFriend + 1, 1).Value = strArray(1)
Cells(intFriend + 1, 2).Value = strArray(5)
Cells(intFriend + 1, 3).Value = strArray(6)
Cells(intFriend + 1, 6).Value = strArray(4)
Cells(intFriend + 1, 5).Value = strArray(3)
Cells(intFriend + 1, 4).Value = strArray(2)
Next intFriend

I understand how this works, but I don't know what numbers should be placed into the () for the strArray. The numbers coordinate with 6 pieces of personal information for intFriend 1. They are placed in A2-F2. My problem is that I have no idea how to change this information to apply to all the other friends (the current formula repeats friend 1's information for all the others). For example, friend 2's information involves Arrays 8-13, and friend 3's involes 15-20.
My question is, in a nutshell, what should I place in the () for strArray so that the proper information is placed for each person?
All help is greatly appreciated!

Purchase this Solution

Solution Summary

This solution discusses and assists with problems that require using loops and string arrays in Excel.

Solution Preview

To do this, you must change the argument in such a way that increases the value ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Networking Questions

This quiz consists of some basic networking questions.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

This quiz tests a student's knowledge about C++ operators.