nth cell in the range

Within a VBA Module, I would like to set the ith component of my array
A(1 to N) to be equal to the 100*(nth cell in a column in excel).
How can I do this within a loop?

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Software!
http://www.ozgrid.com/Services/excel-software-categories.htm **
0
asd3075 (4)
5/21/2004 10:54:28 AM
excel 39879 articles. 2 followers. Follow

1 Replies
754 Views

Similar Articles

[PageSpeed] 32

Hi
try something like the following

sub foo()
dim c_values(1 to 100)
dim i
for i = 1 to 100
  c_values(i)=activesheet.cells(i*100,"A").value
next
end sub

>-----Original Message-----
>Within a VBA Module, I would like to set the ith 
component of my array
>A(1 to N) to be equal to the 100*(nth cell in a column in 
excel).
>How can I do this within a loop?
>
>** Posted via: http://www.ozgrid.com
>Excel Templates, Training, Add-ins & Software!
>http://www.ozgrid.com/Services/excel-software-
categories.htm **
>.
>
0
frank.kabel (11126)
5/21/2004 11:09:32 AM
Reply:

Similar Artilces:

How do I change the names of the cells or columns from "A" to wha.
I am tryng to set up a form for my trucking business and on MS Works I was able to change the format from A, B,C,D,E, to names that were needed for my form. I can not seem to do that with Excel. I am only computer smart as to what I have taught myself so I don't know wether I want to change the cell or column name. So does anyone know what Iam talking about? Jeanne, you can not change the column headers to names, you can put your names in row 1 and use it for your headers and freeze row 1 where it want move when you scroll the sheet, to do that select A2 then window, freeze panes ...

Possible to 'copy' cell data into another cell?
If for example A1 contains: hello B1 contains: you Is there a equation/command to put in cell C1 to get it to copy info from other cells i.e. so C1 shows: hello you ???????? =a1 & " " & b1 If you decide you want money or dates, you can use something like: =a1&" "&b1&text(c1,"mm/dd/yyyy") Dave wrote: > > If for example > > A1 contains: hello > B1 contains: you > > Is there a equation/command to put in cell C1 to get it to copy info > from other cells i.e. so C1 shows: hello you > > ??????...

Creating new series requires div cell val by itself . How to do t.
I am trying to rebase a time series which requires dividing the first value in each series by itself. I keep getting circular error messages regardless of how I format the calculation. Is ther a way around this issue? Texas When you divide a number(and time is a number) by itself you will get 1. Is that what you want? You could use a couple of helper columns. Assume data in column A. In B1 enter =A1. In C1 enter =A1/B1. Gord Dibben Excel MVP On Mon, 21 Mar 2005 12:35:08 -0800, "Texastom" <Texastom@discussions.microsoft.com> wrote: >I am trying to rebase a time ...

Merge 1000+ cells into one
Good morning I am really hoping someone can help me with this. I have a worksheet with 1 column (A) and 1439 rows. I need to combine all 1439 of these cells into one, using the following format: A1 & "" & A2 & "" etc. Naturally, doing this manually would take several hours (and be extremely vulnerable to mistakes.) Is there a method using VBA that I could do this? Thanks for any ideas. Paul Hi, Try this Sub pvans() Dim TempString As String Set sht = Sheets("Sheet1") Set MyRange = sht.Range("A1:A1439") For Eac...

Counting entries in a cell
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel How do I count entries in one cell based upon criteria in another cell. I have one column designating gender (M or F) and the adjacent column designating their respective ages. I want to write a formula that will count all the men over 18, or all the women between 18 and 65. I need help! On 5/12/09 11:26 AM, in article 59bae30c.-1@webcrossing.JaKIaxP2ac0, "memonson@officeformac.com" <memonson@officeformac.com> wrote: > Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Inte...

Highlighting cells
Is it possible to write an if statement that would highlight a cell in yellow if the value in that cell was greater then $1.00 and if so how would I write that. Thanks in advance for any help. __________________________________________________________________ Jay Kelly ICQ#: 59630211 Current ICQ status: + More ways to contact me __________________________________________________________________ Not an if statement, but look at Conditional Formatting in XL Help. For more, you might take a look at David McRitchie's site: http://www.mvps.org/dmcritchie/excel/condfmt.htm or Chip Pe...

Some Cells display text others dates in the same column
I imported a .csv file into Excel. One column contains the SKU # of a product. All my SKU's are formatted as x-xxxx. However some of the cells in the column display the SKU as it should, but many (45 out of 170) are displayed as a date format mmm-yy. Each one of the 45 is different. The cells in question show up as "custom" and when I try to change it to "text" I get a completey different number than the SKU I need. Somebody please help. Hi Phil, Format the entire column manually, choose Format, Cells, Number tab, Custom and enter #-#### in the Type box...

use command button to total datas in cells through VBA codes in ex
how can i establish a new command button in combo box to total datas in cells by wrinting VBA codes ?? thanks you ! Roy ...

Hide and Protect Cells/Columns in Resource Sheet
I am working in Project 2003 Resource Sheet and have entered Standard Rates for the resources and would like to hide these rates. (Similar to how you would use Custom format to hide cell contents in Excel). Can this be done in Project? I know you can hide a column but anyone can redisplay a hidden column. Is there a way to hide and protect the rates so that other users cannot see them? Thanks for your help. Yes. Delete the rates from any file that you give to anyone who should not see the rates. Hidden, protected. -- Trevor Rabey 0407213955 61 8 92727485 PERFECT PR...

Custom chart gallery and range name conflicts
When I create a user-defined chart type, Excel seems to copy lots of range names to the file xlusrgal.xls. Is there a way to stop it doing this because it is triggering lots of problems. It creates a range name conflict when I try to create a new user-defined chart type, unless I run a macro like: Sub deletenames() For Each myname In ActiveWorkbook.Names myname.Delete Next myname End Sub in xlusrgal.xls Is there any way round this? I get this problem using Excel 97 and 2000 (I don't have XP or 2003). (let me know if this question should have been asked to microsoft.public.excel.progr...

disable cells
Hi There, I just want to know how to disable certain cell/column/row in an excel sheet without using protect sheet option. I have Microsoft Offices 2000 installed on my PC. Thanking in advance Gaensh Something I have used in the past (although not as secure as protection - which is also not all that secure) is to use cell validation, set the Allow: to Custom, then in the formula enter <> this essencially does not allow any data entry to a cell, unless of course the validation is removed. Simon "Ganesh" wrote: > Hi There, > I just want to know how to disable cert...

Putting a word into a cell.
I would like to put a word into a cell depending on the value in another cell. Example: Cell A1=399 Cell B1=401 Cell C1=400 Cell D1= Pass or fail So if C1 is within or equal to A1 and B1 I would like D1 to say Pass. If C1 is outside the range of A1 and B1 I would like D1 to say Fail. Also if its Pass I would like it to be Green text and Fail to be Red text. Thanks in advance Carl -- the-jackal =IF(AND(C1>=A1,C1<=B1),"Pass","Fail") also select D1 and use Format/Conditional Formatting, and change the 2nd dropdown to be "equal to", and type the w...

Using the active cell content
I'd like to update result of formula in any cell, according to the content of the active cell. How should I write the formula ? ex in A1:A10 are the years from 2001 to 2010 in A21, i'd like to see the content of the cell I click on (within the A1:A10 range). What should I write as a formula in A21 ? Thanks You could use a formula like this but it requires a calc to make it update, as all formulas do. =INDIRECT(CELL("address")) -- Jim Rech Excel MVP "Vincent DAVID" <anonymous@discussions.microsoft.com> wrote in message news:45de01c4c5a5$51b55310$a601...

Splitting cells into multiple records
Hello, Here is what I am trying to do. I have an access DB that Excels pulls info out of and puts in a nice little format. My issue is that some of the fields have multiple records in it. Here is an example of the DB: First Name | Last Name | Issue | Remediation You would only have one first and last name, but there might be multiple instances in the issue and remediation cells. First Name | Last Name | Issue | Remediation John |Smith | Issue Number 1 | Remediation Number 1 | Issue Number 2 | Remediation Nu...

Tabbing from cell to cell
I need to be able to tab from a certain cell to the next and so on in order. I understand that I should hold control, and click on the cells in the order I need to move through them. Then, I press ctrl+F3 and give a name to the tab order. What next? How do I call back that tab order to use when I open up a specific document? Thanks! Once you've set up the name, then you press CTRL+G and type in the name of the range. This will select the cells. (Or type the name of the range in the "Name" box at the left end of the formula bar.) On Sun, 3 Oct 2004 20:17:02 -0700, "Amb...

How can I view word wrapped text in cells that have been merged?
Formtat -> Row -> Autofit is not working Manually resize the rowheight. (merged cells don't react to autofitting of rows) Xcelsearcher wrote: > > Formtat -> Row -> Autofit is not working -- Dave Peterson ec35720@netscape.com ...

monitoring a changing range of cells
Hi, I am trying to find/create a function which allows me to monitor a changing range of cells. I have a column in which the user types yes or no, and then in another cell I am checking to see if all of the cells say "yes". My problem is that I want the user to be able to add more rows of yes or no to the column and to be able to check these new cells for the "yes or no" condition. I am currently using function code that looks like this. =IF(((AND(EXACT("YES",UPPER(range)))))=TRUE,"YES","NO") As you can see I have to give the function a...

Trying to group cells so that I can sort the upper most cell with.
I have schools that are linked to three different businesses. I am trying to sort the schools by their name, but when I do, it sorts the businesses by their names as well. How can I make the schools sort and simply pull the businesses that are under them with them? I need to group them in such a way that it sees the school and moves the entire block with the school name without moving any of the businesses. Can anyone help me with that? Hi it's hard to answer this without knowing what your worksheet looks like, if it looks like this: ..........A..............B 1....School1......Bu...

Recommendations for low-cost cell phone for use with OMA
Any recommendations for reasonably-priced cell phone models that work well with OMA? I know OMA can work with a wide range of phones, but which work well? We already have Blackberrys here, just looking for lower-cost alternatives. -GT IMHO....as long as your cell phone is web enabled, I don't see why you couldn't get the cheapest phone available. "GT" <DSS4u@+++nospam+++HOTMAIL.COM> wrote in message news:1SS4e.10297$Mg.2956@charlie.risq.qc.ca... > Any recommendations for reasonably-priced cell phone models that work well > with OMA? I know OMA can...

Can I extract unique cell values from every nth column?
I have a range that covers B5:XA160. For each row, data is entered in 11-cell groups: date, some numbers, description (a text value), more numbers, and more numbers. At first it was enough to merely count how many times certain descriptions appeared, because those were the only ones we would see - or so the story went. Now, I need to extract the unique descriptions AND provide a count! Actually, I'm cheating a bit. I'm using SUMPRODUCT to return the number of times the expected descriptions appear, and by subtracting these from the total number of text values I get a count of &quo...

What is the warning triangle in a cell and how do I get rid of it.
I'm using the new Office 2004 for the Mac and first, I hate it! But, how do I get rid of the green (warning?) triangle in the cells. I haven't entered a equation and I have no idea where it came from. Please help. I don't have a Mac but you may be seeing the background error checking flag. If so, you can turn off this feature (in Windows versions at least) under Tools, Options, Error Checking. -- Jim "confused" <confused@discussions.microsoft.com> wrote in message news:71CF7B27-CD53-4E18-805A-7F8FFE79FB27@microsoft.com... > I'm using the new Office 2...

Count on cell for each time it is changed
I would like to count the number of times a cell has been amended/ changed e.g cell b2 has the word red it it, in cell c2 i would like a counter for everytime the cell in b2 has changed, at the end of the day you get final number. Is this at all possible? Jelinek, You can do it by putting the following VBA macro in your sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$2" Then Cells(2, 3) = Cells(2, 3) + 1 End If End Sub Art "Jelinek" wrote: > I would like to count the number of times a cell has bee...

cell value depends on value in another cell question
Hi. Anyone know how to have a cell formula control the information in another cell? I'm trying to get a row of cells to only allow one x (trying to get them to act like a check box that only allows one check). I can't figure if excel is capable of controling a cell's value from an outside formula. Hi maybe 'Data - Validation' is what you're looking for. See http://www.contextures.com/xlDataVal01.html -- Regards Frank Kabel Frankfurt, Germany Sylvia wrote: > Hi. Anyone know how to have a cell formula control the information > in another cell? I'm tryi...

Linked cells #4
I have two spreadsheets. One has a list of names and the other has only 4 cells, each with a link to one of the first four names in the first spreadsheet. I would like to print the second spreadsheet and then delete the first four names in the first spreadsheet so that the cells in the second spreadsheet now contain the next 4 names on the list. When I delete the first 4 names in the first spreadsheet, the links in the second spreadsheet fail and I get #REF! in the cells. I have tried both relative addressing and absolute addressing and both return the same error when I delete th...

Edit directly in Cells
I am having intermittent (daily) problems with 'Editing Directly in Cells'. After hitting the [F2] key to edit data in a cell, the edit bar cursor shows in the cell correctly. But, when I use the arrow keys in jumps to the next cell to the left as if I hit [Shift][Tab]. I do have the 'Edit Directly in Cells' checked in Options-Edit. Turning it off and on does not make any difference. I must use the mouse to select the text to edit. We tend to input some status language at the end of the task name, so this would be a productivity impact. I have researched the we...