Compare Results in an Array

Robb

Board Regular
Joined
Feb 17, 2002
Messages
145
I have to compare the values of an array with a another value. How do you add items to an array using VBA Code? For example:

Col A = Start #
Col B = End #

Cell A1 = 100, B1 = 200
Nothing in Row 2
Cell A3 = 300, B3 = 400
Cell A4 = 500, B4 = 600
etc....

Now I want to compare each Start # and End # with my Start # and End #. Any Help would be fabulous!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi Robert,

I don't understand your question, so maybe others are confused as well. Can you provide some clarification?

In particular, your question subject line refers to adding values to an array, but your problem never refers to either "adding" or to an "array". In your example you show a set of start/end times, but these appear to be in cells and not the result of an Excel Array formula, so are you just using the term "array" in a very general sense?

Damon
 
Upvote 0
It's OK, I got around the task. Thanks anyways.

All I wanted to do was put a range in an array so that I could loop through each individual number to compare against my number.
 
Upvote 0

Forum statistics

Threads
1,213,511
Messages
6,114,054
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top