Search: | |||||

| ||||

Home » Forum » MS Office | RSS Feeds |

I have 2 arrays (name ranged)... one is used as a flag (and is

text) the other is an array of integer values that flow through

calculations. I would like to write a code that looks at at flag to

see if it's on or off and, depending on that result, write a value into

the parallel value-array.

What's the best way to do this? I could probably get something crude

to work using active.cell offset type code, but there's got to be a

more efficient way to handle this. Any comments or suggestions would

be very much appreciated.

to follow up on what I posted previously... this seems to work. I'm

still interested in what others are doing for this type of problem

though....

Dim FlagArray As Range

Dim ValueArray As Range

Dim i As Long, j As Long

Set FlagArray = Range("FlagArray")

Set ValueArray = Range("ValueArray")

For i = 1 To FlagArray.Rows.Count

For j = 1 To FlagArray.Columns.Count

If FlagArray.Cells(i, j).Value = "X" Then

ValueArray.Cells(i, j).Value = 2

End If

Next j

Next i

End Sub

Didn't find what you were looking for?
Find more on Array Logic
Or get search suggestion and latest updates.

Related Topics:

- Array to array direct transfer in VB
- Array of Arrays
- About using UTF-8 charset in JSP pages in Web logic
- Logic error
- BEA Web Logic
- J2EE logic test solution - JTracker
- help needed for logic building
- Can Any one help me writing logic for the given formula
- Using Boolean logic instead of IF, AND, OR functions
- Please Help on IF AND OR logic
- Design Logic
- Javascript Array
- Arrays in Forte 3
- Byte Array Questions
- need array based code to solve this polynomial
- multiplying Two array
- ADD Array Problem
- How to Add two Array
- Help with searching and deleting arrays
- about arrays
- arrays
- A few Q's on arrays
- Help with tag embedding in an array?
- Create an image from an integer array
- help with arrays