Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Processing a matrix: skipping some cells

Status
Not open for further replies.

seagreenTurtle

Programmer
May 18, 2010
8
US
A coworker is trying to process a matrix using VBA in Access. He asked how to use for (or for each?) loops to add data to the database but skipping the first two cells as well as the last 4. The matrix has columns 1 though 12 and rows A though H. Would he use nested for loops? Can he start at cell A3 and loop through until cell H8? I am not proficient enough in VBA to help him but if someone is kind enough to answer here, I can point him to tek-Tips and this forum.
Thanks in advance for your time and help!


 
If this is Excel, there may be easier ways, such as linked sheets/ranges or using ADO. If it is not Excel, perhaps you could say what it is?

 
Thanks Remou but it needs to be done in Microsoft Access not Excel. Wouldn't using an array be the way to do it? Or is there a better way?
Thanks.
 
I am sure we can help, but this question is like saying "my car will not start should I use a socket wrench or a crescent wrench?"
You need to be way more descriptive, I have no idea what you are asking.

1. What do you mean by process a matrix? I assume you mean read the data from somewhere and enter into some unspecified table.
2. What application is the matrix in: excel, a vb variable, text file?
3. What is the "big picture" of what you are trying to do.
4. What tables and fields are involved?
etc
 
The problem is that a coworker just asked me verbally and did not give me details. I had hoped that I could find out some method or methods to load data from an array into an Access table from an array but an array with the first two and last four cells to be skipped. In my defense, I did say he was using Access ABA not Excel. If this is not enough information to go on, I understand. It's all I have. Thanks anyway.
 
You can iterate through an array, you can skip cells and so on, and you can update tables in a myriad of ways, but a matrix that has letter/number references looks very like an Excel sheet, hence my remarks, because it is very easy to get data from Excel into an Access table without any messing about in code at all.

 
Thanks Ramou. I know that he has to process data from 96 well plates (microarray plates) but needs to skip the first two and last four cells. He needs to do this repeatedly for many plates and set up an application for a user to run repeatedly for many plates. Can it be done in Excel and loaded into Access? Is that what you had in mind? If so, can I point him to a resource on how to do this? Does the skipping of cells make it trickier?
Thanks.
 
What format is the well plate data in?
 
I don't know, probably alphanumeric data. I have just been hoping for some pseudocode for the routine, with detail about how to handle skipping the cells mentioned above.
Thanks.
 
I have told you all that I know because my coworker just told me what I have described. If no one can help, I understand. As I mentioned I was just hoping for a few suggestions. For example, "use two nested for loops and and if statement to test if the cells are the ones to be skipped over". I didn't realize that that is considered inappropriate for this forum. My apologies.
 
By format I mean is it in Excel, a text file, web page, hard copy, a variable in code, carrier pigeon?
 

You keep stating that you've told us everything you've been told by your co-worker. The responses you've received clearly indicate more information is needed. Have you considered relaying any of these questions to the co-worker that, most likely, has the answers?


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top