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: 192
Default Populating and Comparing Arrays

I want to feed two sets of cells into two arrays and then compare the array
values. If the values compared within the array match I want to add 1 to a
variable I called "Points". This is the code I have so far to do this:



Option Explicit
Dim Entry1()
Dim Checker()
Dim Points As Integer
Dim X As Integer



Sub Compare()
For X = 1 To 2
Entry1(X) = Workbooks("Entry1.xls").Sheets("sheet1").Cells(3 + (5 * X),
4).Value 'This is what the debugger keeps flagging as wrong
Checker(X) = Sheets("Source").Cells(3 + (5 * X), 4).Value

If Entry1(X) = Checker(X) Then Points = Points + 1
Next X
ThisWorkbook.Sheets("Summary").Range("c6") = Points


End Sub

 
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
How Populating Arrays/Range in VBA code [email protected] Excel Programming 3 November 16th 06 09:19 PM
Comparing Arrays KL Excel Worksheet Functions 9 December 3rd 04 08:58 PM
Comparing to Arrays [email protected] Excel Programming 1 August 31st 04 08:47 PM
Comparing to Arrays [email protected] Excel Programming 0 August 31st 04 07:50 PM
Comparing to Arrays [email protected] Excel Programming 0 August 31st 04 07:41 PM


All times are GMT +1. The time now is 07:30 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"