LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Array Problem??

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
3D Array Problem sgl Excel Worksheet Functions 2 July 6th 09 06:46 AM
Array Problem Scott Excel Discussion (Misc queries) 4 May 9th 06 05:22 PM
Array-problem Tom Excel Programming 2 November 24th 03 05:59 PM
Array Problem Phil Hageman[_3_] Excel Programming 0 November 19th 03 07:34 PM
Array Problem, Help Please. Bubu Excel Programming 9 November 18th 03 04:29 PM


All times are GMT +1. The time now is 02:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"