Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Everyone,
I am having trouble trying to get the information into the array and then writing it into cells on a different sheet. It seems to be loading into the array fine, but when it writes it to the sheet, it shows two of the same thing and it should be two different values. Here is the code: Up at top I have Dim myArray() As String (Then a bunch of code here to determine 3 variables.) IPL ='s Indiana Power and Light, HSC ='s Howard Sewer County, and BID ='s BidPro. Now, My code has determined that IPL and HSC are values, and BID is "". Then the following code is continued after determining the variables mentioned above. Y = 0 If IPL < "" Then Y = Y + 1 If HSC < "" Then Y = Y + 1 If BID < "" Then Y = Y + 1 ReDim myArray(Y) J = 0 If IPL < "" Then myArray(J) = IPL: J = J + 1 If HSC < "" Then myArray(J) = HSC: J = J + 1 If BID < "" Then myArray(J) = BID: J = J + 1 lLastarray = 10 + J - 1 Sheets("Sheet2").Range("E10:E" & lLastarray).Value = myArray When I run the code, it shows Indiana Power and Light twice in E10 and E11. It should show Indiana Power and Light on E10 and Howard Sewer County on E11. Why isn't it doing that???? Thanks in advance.. mv |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
3D Array Problem | Excel Worksheet Functions | |||
Array Problem | Excel Discussion (Misc queries) | |||
Array-problem | Excel Programming | |||
Array Problem | Excel Programming | |||
Array Problem, Help Please. | Excel Programming |