array data type

Hi, I'm trying to take a column of integers and input them into an arra
which I can then use for a loop instead of using this format: 
If (Worksheets("NeeleyNedPRE").Cells(pRow, pCol).Value = 0) Then

For some reason this doesn't work because the column selected al
resets to zero rather than running the loop correctly and I think tha
an arrray might be the only option. What the easiest way to solve thi
problem?
-Andre

--
Message posted from http://www.ExcelForum.com

0
6/15/2004 2:38:38 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
542 Views

Similar Articles

[PageSpeed] 55

anjem < wrote:
> Hi, I'm trying to take a column of integers and input them into an array
> which I can then use for a loop instead of using this format: 
> If (Worksheets("NeeleyNedPRE").Cells(pRow, pCol).Value = 0) Then
> 
> For some reason this doesn't work because the column selected all
> resets to zero rather than running the loop correctly and I think that
> an arrray might be the only option. What the easiest way to solve this
> problem?
> -Andrew
> 
> 
> ---
> Message posted from http://www.ExcelForum.com/
> 
Post the troubling code.

Alan Beban
0
unavailable (273)
6/15/2004 4:17:28 PM
Dim xDataArray(10940) As Integer
Dim rowCount As Integer
For rowCount = 21 To 10940
Worksheets("NeeleyNedPRE").Range("I" & rowCount).Value =
xDataArray(rowCount)
Next rowCount
Dim Check As Boolean
Check = True
Dim xArray(10940) As Integer
Dim xCount As Integer
xCount = 0
Dim pRow, pCol As Integer
pRow = 21
pCol = 12
Do
Do While i < 10920
If (Worksheets("NeeleyNedPRE").Range("L" & pCol).Value = 0)
Then
xCount = xCount + 1
pRow = pRow + 1
i = i + 1
xArray(i) = xCount
Else
pRow = 0
pCol = pRow + 1
i = i + 1
xArray(i) = xCount
End If
Loop
Check = False
Loop Until Check = False


---
Message posted from http://www.ExcelForum.com/

0
6/15/2004 5:39:48 PM
After Dim xDataArray(10940) As Integer, xDataArray is a one-dimensional 
array with all elements equal to 0.  What are you expecting

 > Worksheets("NeeleyNedPRE").Range("I" & rowCount).Value =
 > xDataArray(rowCount)

to do? (It is simply setting all the values in I21:I10940 to 0.)

Alan Beban

anjem < wrote:

> Dim xDataArray(10940) As Integer
> Dim rowCount As Integer
> For rowCount = 21 To 10940
> Worksheets("NeeleyNedPRE").Range("I" & rowCount).Value =
> xDataArray(rowCount)
> Next rowCount
> Dim Check As Boolean
> Check = True
> Dim xArray(10940) As Integer
> Dim xCount As Integer
> xCount = 0
> Dim pRow, pCol As Integer
> pRow = 21
> pCol = 12
> Do
> Do While i < 10920
> If (Worksheets("NeeleyNedPRE").Range("L" & pCol).Value = 0)
> Then
> xCount = xCount + 1
> pRow = pRow + 1
> i = i + 1
> xArray(i) = xCount
> Else
> pRow = 0
> pCol = pRow + 1
> i = i + 1
> xArray(i) = xCount
> End If
> Loop
> Check = False
> Loop Until Check = False
> 
> 
> ---
> Message posted from http://www.ExcelForum.com/
> 
0
unavailable (273)
6/15/2004 6:56:24 PM
Reply:

Similar Artilces:

Advice required
I need to create some graphs from data that is derived from a long series of separate calculations on my source data. For aesthetic reasons, I would like to hide all the "interim" calculations on the spreadsheet, but I've noticed that as soon as I hide the interim data (i.e set the row height to zero), the detail on the graphs disappears. I presume that this is a design feature feature of Excel (I supoose I can just about accept the rationale for it), but does anyone know whether there's a way around this? Many thanks. CRS. Use white fonts -- Regards, Peo Sjobl...

when i type i am not seeing any text in Outlook 2003
I am using Microsoft Outlook 2003, I don't know what happened but when I try to send an email nothing appears instead I only see read error lines on the screen. I have tried everything but nothing works. I cannot type because no text appears on my screen. I am not able to send emails. Please help!! After typing a couple of words that you do not see, try to highlight the area where you typed.What happens? Is your font colour set to white? Peter "tigka98@hotmail.com" <tigka98@hotmail.com@discussions.microsoft.com> wrote in message news:777622D7-4C61-432B-B8AD-5...

AHHHH-Get Data from Multiple Excel workbooks
Dear All, I am going down real bad. 1 - I have many excel workbooks. Let's say around 30. 2 - Each workbook contains only 1 sheet or may in the future contain more sheets. 3 - Each sheet contains list of data with dynamic named ranges which expand as new data is entered. 4 - How do I create a query in Excel (MS query) from the Data > Import External Data > New Data Base Query command. 5 - I tried everything. Nothing works. I can not add a second excel workbook while I want to add as many workbboks as I want say 30. The Owner & Table > Add Table > Workbook options in MS...

Outlook 2000 to 2003 transfer user data
Hey there, I need to transfer the user files from a windows 98SE with Outlook 2000 to a newer XP Pro based P.C with Outlook 2003. What do I need to do? -- "You''re only as good as your last build". Answered here daily. The file you need is your Personal Folders file (*.pst) It's where all the mail, calendar, contacts etc are stored. Take a look at these pages for info on Outlook data backup or transfer: http://www.slipstick.com/config/backup.htm http://www.howto-outlook.com/Howto/backupandrestore.htm http://office.microsoft.com/en-us/assistance/HA010...

How can I check whether the data is in the table or not with VBA?
Hi, Hope someone have quick answer to my question. I have a table call "IssueTable". I want to code to find out whether the user inputed informaiton is in the IssueTable before user enter it in the table. I don't want to duplicate the issue in the issuetable. Therefore, I want to check it before I enter it as new item. In the Usertable, there is the Authrization# field and if user enter part of Authrization#, I want the code to check if the User input is in the Issue Table. Thanks Use DLookup(). For examples, see: Getting a value from a table: DL...

Show all data -- FMR
I have 4 tables, each shares Date and Service, but after that they vary from budget details, to capacity details, all the way to actual details. Since the budget details go out into the future and the actuals do not, I want to produce a worksheet showing data from all tables from a date and out to a specified date. I know how to do the date request but the only data I get from my query is what is populated in all tables. (linked on Service and Date) Any assistance would be appreciated: EX: Date Forcast Budget Actual 1/1/07 ...

Restructuring text data in excel? Pivot?
Hi! I have a large sum och data in the order below: Choice Course 1 Course 2 Course 3 Course 4 1 Name 1 Name 3 Name 2 Name 1 2 Name 3 Name 4 Name 4 Name 3 3 Name 5 I would like to structure it differently to the format below: Choice 1 2 3 Name 1 Course 1 Course 4 Name 2 Course 3 Name 3 Course 1 Course 2 Course 4 Name 4 Course 2 Course 3 Name 5 Course 1 Is this possible? I have been trying to use pivottables without any luck. Cheers and thanks, Pete Pivottables work with numbers (sum of, max of, average of). They won't work with text. And I don'...

Typing LAGS in Outlook 2007
New Dell Inspiron, Vista, OEM Office--the Outlook is lagging - every time I type or select anything there is a small delay. For a fast typist, this is disconcerting as I am a sentence ahead and nothing shows on the screen. Not happening in other word or text programs. I have a import .pst file that also says, it can't be accessed and it seems like it is looking all the time. I tried to delete it but it won't let me. Any help will be appreciated. Since its a Dell, it's probably Media Direct causing it: http://www.slipstick.com/problems/recurringmeetings.htm other causes: ht...

Is there a way to track quantities other than item type 1?
We're trying to come up with a better way to track component items v.s. sales inventory items in the inventory module. We sell manufacture and sell eletronic equipment. To simplify matters, say we sell pc's. So in our sales inventory we have pc100, pc200 and pc300 and we are tracking the quantities of these pc's we have on hand so they're set up as item type 1-Sales Inventory. To make the pc's we have components motherboard1, motherboard2, powersupply1, powersupply2, videocard1, videocard2, case1, case2, and case3. ( the only difference between pc200 and pc300 is ...

Aligning data with varying decimal places
I have a column of cells in which the data include various numbers of decimal places. Is there a way to align the data vertically so that the decimals line up, without adding trailing zeroes? one way: Format/Cells/Number/Custom 0.??? In article <DD9B0C05-0A1D-4A5A-99F4-BB8030D9F7F2@microsoft.com>, edpaul <edpaul@discussions.microsoft.com> wrote: > I have a column of cells in which the data include various numbers of decimal > places. Is there a way to align the data vertically so that the decimals > line up, without adding trailing zeroes? ...

How backup data in Outlook2003w/BCM?
I'm using Outlook 2003w/BCM, and wondered how to backup everything before I uninstall/reinstall Outlook, so I get back to everything looking exactly the way it was before the re-install. (What cause this is...I have an underlying WinXP problem affecting the whole PC, so I have to format/reinstallWinXP, and of course that causes me to loose and have to re-install Outlook...but right now Outlook works ok, so the data's still in tact) In Outlook, there's a File > Business Database > Backup... but it says I also need to backup "linked items." So, what all needs to be...

Listing a selection of data from one worksheet on another
At the moment I have a worksheet with a list of client in one column and then in another column that uses an IF formula to display either the number of days to the deadline or text which says No Deadline. What I want to do is enter some kind of formula so that a list of clients with deadlines between 1 and 7 days appears on another worksheet automatically with the number of days to the deadline next to them. To make it even harder the list is currently in name order but on the new worksheet I would like it to automatically appear in days til deadline order with lowest number of days a...

2 sets of data I need one line
I have two sets of data, height and distance and I want both to be on the same line and not two seperate lines. I would appreciate any help Thanks Hi, You need to create a xy scatter chart. Assuming you have already tried selecting both ranges of data and creating a chart try this instead. Select the y values and create a xy scatter chart. Then right click chart and use the Source data dialog to specify the x values. Cheers Andy Tim wrote: > I have two sets of data, height and distance and I want both to be on the > same line and not two seperate lines. I would appreciate any he...

Create Data Entry "Wizard"
Hi everyone, I'm trying to create a data entry "wizard" for a database. Basic premise - a company has clients that they need to be able to track various aspects of information about. All information might not be available at the time of entry. I'd like to have an AddClient form (data entry mode) with buttons for Add Address (ClientAddress form), Add Phones (ClientPhones form), and Add Emails (ClientEmails form). How can I pass the ClientID value created on the AddClient form to the ClientAddress (and other) forms? Thanks in Advance! On Fri, 14 Mar 2008 09:31:03 -...

Retrieving data from multiple records
How do I put data from multiple records in one report on one line. I have parents in one table and children in another. Each child has its own record. How can I include a sentence like this in a report when the children's names come from various records: "Thank you for registering Brianna, Sean, and Emma for our art workshop." Also, there are other children in the family who were not registered. Using Access 2003. Thanks for your help. There is a generic function that will concatenate the child records at http://www.rogersaccesslibrary.com/forum/forum_posts.asp?T...

Duplicating PivotChart / Changing PivotChart data range
I have a worksheet with a pivottable and an associated pivotchart, all nicely formatted. I want to make a duplicate of this so I can configure the data selection differently, but still retain the formatting. In Excel 2003, I just duplicated the worksheet and the new pivotchart would be associated with the new pivottable. In Excel 2007, I find the new pivotchart is *still* tied back to the original pivottable. Is there a way around this? If I select the PivotChart Tools, I see 'Select Data', but the section for "Chart data range" is grayed out and will not allow edits. I t...

Array Formulas
Is there some kind of default I need to reset in order for the arra formulas with the {} bracket to take effect after pressin CTRL+SHIFT+ENTER? For some reason the formula is not bracketed {} eve after pressing the CTRL+SHIFT+ENTER keys. Thank you for any info you might be able to share -- Message posted from http://www.ExcelForum.com mymk You must be in Edit Mode when you CRTL + SHIFT + ENTER. Double-click on the cell or click on formula in formula bar. Then CSE Gord Dibben Excel MVP On Fri, 14 May 2004 16:34:36 -0500, mymk <<mymk.169mbn@excelforum-nospam.com>> wrote: &...

Excel should allow chart axes to be set from sheet data.
I often chart account balances where I have x axis of dates and y axis of monetary amounts. It would be helpful if there was a facility to allow the x axis minimum and maximum to be set to some value as calculated from the data itself (or even calculated using a formula). I like to keep a "rolling" picture of the last three months (so, today()-90 to today()) and the next three months (today() to today() + 90) (on two separate charts). I have to manually update the x axis's minimum and maximum each day. you can set up formulas in cells to calculated your desired max/mins a...

help with schema for xml data from exchange server
I have xml data coming in as a stream from a web service running against exchange server.The attributes for the elements dtstart and dtend, b:dt="dateTime.tz" xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/, are causing trouble. I tried to create schema using xmlspy and I get an error saying name "b:dt" cannot have a namespace prefix. I am new to xml. Can somebody please help with schema. <appointments> <appointment> <url>http://test/exchange/test1/Calendar/meeting1-7.EML</url> <subject>meeting1</subject> <dtstar...

selective import data from SO to HQ
Can i selectively import data(customer, cashier, etc.) from SO to HQ and export it out to other new stores? Thanks. - The customer data is brought to HQ automatically through Worksheet 401. So answer is NO you cannot be selective about this. - Cashiers are not global setting [unless you use RR HQ Misc that allows you to have global cashier and send messages from to store]. Afshin Alikhani - [afshin@retailrealm.co.uk] CEO - Retail Realm -- URL http://www.retailrealm.co.uk "JayK" wrote: > Can i selectively import data(customer, cashier, etc.) from SO to HQ and > expo...

Help needed with Data Validation.
I have a workbook that contains a Template sheet and several copies of it, N01 - N0X. I need to control what can be entered in certain cells in N01 - N0X, so need to use Data > Validation > List. I also want users to be able to enter their own free form text in some cells, so have to use named ranges, and include a blank cell within the range. I have a separate sheet 'Validation' so as to be able to only have to update this one sheet and have the changes reflected in the drop down options in the template and all copies. I have played around with this and am now co...

Timesheet NONbillable data
whenever i enter timesheet under administrative tasks Actualnonworkbillable is not reflecting in database?? Can i have link between Project Resource and Timesheet Resource is this possible in project server database??? ...

Whats the formula to look at data in precentages in fixed periods
how do I calculate a continous percentage return of two data points at fixed intervals? example : data set={12,50,03,59,22,....} , fixed interval=2periods. [(12-03)/12], [(50-59)/50], [(03-22)/03],....I'd like to do this in Excel 03 "donald" wrote: > how do I calculate a continous percentage return > of two data points at fixed intervals? > example : data set={12,50,03,59,22,....} , > fixed interval=2periods. > [(12-03)/12], [(50-59)/50], [(03-22)/03], Assuming data is in A2 down: 12,50,3,59,22,... In B2: =(A2-A4)/A2 B2 formatted as percentage, then copi...

Data Migration
I'm trying to migrate Sales History information into CRM. Invoices and Invoice Lines are migrating and calculating the Extended value correctly. I'm having a problem with Credit Notes. Credit Note Lines (where Price per unit < 0) are not migrating. I'm getting a "CrmIncidentUnknownError" in the migration log for these lines. The same error occurs for lines where Price per Unit = 0. I've modified all the relevant value fields on the forms to allow minimum values of -100,000,000. I'm using Existing products and over-riding the Price each time. I previously ...

How to automatically populate an Excel database w/data from many forms?
I have a data collection spreadsheet laid out like a form for multipl users; each user will do a save as to create hundreds of records o copies of this form. We are using the data collected to build an Exce database. Currently we are manually keying the data from the form into a single spreadsheet (the database). Is there a way to automat the transfer of the data from the forms into the database? Also, eac record will have a unique ID number. We are working in MS Excel 2002. Thank you -- ~~ Message posted from http://www.ExcelForum.com I think I'd tell the user to run a macro that...