Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having problems with my code. It used to work fine until today. I am
getting type mismatch error in f = Array("STY", "PK", "COLOR", "SZ", "ITEM", "UP", "STORE") What am I doing wrong!! Sample Code L = 0 L = ActiveCell.SpecialCells(xlLastCell).Row Dim f() As String f = Array("STY", "PK", "COLOR", "SZ", "ITEM", "UP", "STORE") Dim FR(7) As Variant Dim x As Integer Dim y As Integer For x = 10 To 37 ' cycles through columns 10 to 37 For y = 1 To 7 ' cycles through all 7 of the items in the "F" array ' Checks the header to see if it is looking at the particular item from the "F" array. ' Then assigns whatever column number that item is in. e.g. if the STYLE is in colume 23 then FR(1) = 23. If CELLS(1, x) = f(y) Then FR(y) = CELLS(1, x).Column Next y Next x Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) | Excel Programming | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming |