15 views

Uploaded by Jaime Diaz

Copyright 2000 Alan Beban,
His website is no longer availble and I am making this file which has many useful functions available for others

Copyright 2000 Alan Beban,
His website is no longer availble and I am making this file which has many useful functions available for others

© All Rights Reserved

- vb question paper solved
- PIC Basic Course
- Ppl Question Bank
- Gd Script
- Arrays,String Handling Functions and Pointers
- 13-pointers.pdf
- 1756-pm010_-en-p
- 2016 Syllabus 12 Computer Science
- ExcelWorkshop-0408-VLookup
- 33002535_K01_000_11
- CFX9850G
- Calender
- Create Innovus
- GOTM
- PHP Basics Tutorial 01
- Array
- sad
- 8310 Sample Paper
- Lab 04
- Gpu Recipe

You are on page 1of 5

'This function facilitates the "direct" assignment

'of a range (or array) to a non-Variant() type of

'array. It will accept as the input "range" to be

'assigned a single-area multi-cell range or a 1-D

'or 2-D non-hierarchical array; and will accept as

'the input array, to which assignment is to be made,

'a dynamic array of a built-in type other than

'"Object()". It provides for a return ("Success")

'so that error trapping can more easily be

'provided in the calling procedure.

Sub ResizeArray(ByRef MyArray As Variant, _

ByVal new1 As Long, _

Optional ByVal new2 As Long = -1, _

Optional ByVal new3 As Long = -1)

'ReDim Preserve can be used to change the size of

'only the last dimension of an array while

'preserving its values; this Sub procedure, while

'preserving the values of the array that is passed

'to it, will increase the size of any or all of the

dimensions of a one-, two- or three-dimensional array.

'Its arguments are the array and its new dimensions.

Function MakeArray(ParamArray InputParameter()) As Variant

' This function will accept virtually any type of basic

' input, and return a one-dimensional "horizontal" array

' (0-based or 1-based in accordance with the last input

' argument), including all the elements of the input data.

' The function will accept arrays of arrays to two levels.

' It is called with, e.g., for a 0-based output array:

' arr = MakeArray(array1, range1, string1, arrayOfArrays, _

'

range2, value2, 0)

Function SubArray(InputArray, NewFirstRow, NewLastRow, _

NewFirstColumn, NewLastColumn)

'This function returns any "rectangular" sub array

'of a two-dimensional input array, as defined by

'the new first and last rows and columns.

Function RowVector(InputArray, RowNumber)

'This function returns an individual row

'vector from a one- or two-dimensional array

Function ColumnVector(InputArray, ColumnNumber)

'This function returns an individual column

'vector from a one- or two-dimensional array

Function ArrayCountIf(InputArray, SoughtValue, Optional Op, _

'This function counts the occurrences of a particular

'value or values, or instances of comparisons in an

'array (or range). To count empty strings the call is

'ArrayCountIf(myArray,""). To count empty blanks it is

'ArrayCountIf(myArray,"="). To count = signs it is

'ArrayCountIf(myArray,"=","="). The Function is case'sensitive if True is entered as the fourth (optional)

'argument; if it is case-sensitive, the comparisons

'are in accordance with Option Compare Binary; if not,

'then in accordance with Option Compare Text. The

'Function will not currently accept an array of sought values.

Function ArrayMatch(lookupValue, lookupArray, _

Optional Output = False, Optional RefStyle = 1, _

Optional CaseMatching As Boolean = False)

'Without an optional argument, this procedure outputs a

'two-column array that contains in each row the row index

'and column index of an occurrence of the lookup value

'in the lookup array (which, if it is a range, must be

'a single area); the entire array is the set of the

'row and column indices of all the occurrences of the

'lookup value. If "A" is entered as the first

'optional argument, and if the input lookup array is

'a worksheet range, the procedure outputs a one-column

'array of the cell addresses of all occurrences of the

'lookup value. The reference style of the addresses is

'determined by the optional fourth argument; absolute

'row and column references is the default, and an

'argument of 2, 3 or 4 assigns the same reference style

'as those arguments for the worksheet ADDRESS function.

'*IF THE LOOKUP VALUE DOES NOT OCCUR IN THE LOOKUP ARRAY*,

'and the function is not being called from the worksheet,

'then the function will return an unannounced error, so

'the calling code should provide for that. E.g., if the

'calling code is in a Sub procedure as x=ArrayMatch([whatever]),

'the call could be followed by If IsError(x) Then [do whatever

'should be done if no matches are found].

Function VLookups(lookupValue, lookupArray, ColumnNumber)

'This function acts somewhat like the built-in VLookup

'Function with exact matches, except that it returns an

'array of all the values corresponding to multiple

'occurrences of the sought value in the left hand column

'(i.e., the first column vector in the lookup array).

Function HLookups(lookupValue, lookupArray, RowNumber)

'This function is the analog of the VLookups Function

'documented above.

Function ArrayCount(InputArray)

'non-blank values in the array, but the

'number of available slots for values,

'whether the slots contain anything or not.

'It's similar to the Count Property (e.g.,

'Range("a1:c3").Count).

Function ArrayDimensions(InputArray)

'This function returns the number of dimensions

'of the input array

Function VLookupLeft(lookupValue, lookupArray As Range, _

returnValueColumn As Integer, _

Optional lookupValueColumn As Integer = -257)

'This function performs a simple lookup for values

'to the left (as well as to the right) of the

'lefthand column of the lookup array. And with 4th

'argument added, it allows any column of the

'lookupArray to be used rather than the lefthand

'column.

Function MatchingValues(indexArray, matchArray, matchValue)

'This function returns an array of the values in an

'array (indexArray) that match a specified value

'(matchValue) in another equal sized array (matchArray).

Function ArrayTranspose(InputArray)

'This function returns the transpose of

'the input array or range; it is designed

'to avoid the limitation on the number of

'array elements that the worksheet TRANSPOSE

'Function has.

Function ArrayReshape(InputArray, NumberRows, NumberColumns, _

Optional ByColumns As Integer = -1)

'This function returns a rectangular, NumberRows X NumberColumns,

'array containing the elements of the input array or range.

'Without the optional argument it fills the output array

'row by row; with the optional argument (i.e., 1), it fills

'the output array column by column

Function ArrayUniques(InputArray, _

Optional AsColumn As Integer = -1)

'This function returns an array of the

'unique values in an array or range. For a

'one-dimensional "horizontal" output, use

'only the first argument, the input array

'or range; for a two-dimensional single

'column output, enter 1 as the second

'argument.

'This function checks to see if two "rows"

'of an array or range are equal; it returns

'True if they are, False if they are not.

Function ColumnsEqual(Column1, Column2)

'This function for comparing columns

'is analogous to the RowsEquals function.

Function ScalarMult(InputArray, ScalarMultiplier As Single)

'This function returns the array resulting from

'multiplying each element of the input array by

'the scalar multiplier

Function ArrayAdd(Array1, Array2, Optional Add = True)

'This function returns an array in which the

'elements of the second input array have been

'added to or subtracted from those of the first

'input array. To add, omit the optional argument

'or insert "Add" (without the quotes) as the optional

'argument; to subtract, insert "subtract" (without

'the quotes) as the optional argument.

Function ConvertBase(InputArray, ResultingBase)

'This function converts an input array to

'a 0-based array or a 1-based array, in

'accordance with the ResultingBase argument

'(either 0 or 1). It accepts arrays with a

'base equal to the number of the ResultingBase

'argument, simply leaving them as is.

Function ArrayRowFilter1(InputArray, FilterColumn As Integer, _

FilterValue, Optional Op, Optional MatchCase As Boolean = False)

'This function returns an array of the elements in rows of an

'array in which the value in the specified Filter Column

'compares, as specified in the fourth argument, to the specified

'Filter Value; if the fourth argument is omitted, the comparison

'is equality. The filtering is case sensitive unless the fifth

'argument is entered as False. If the Function is called as

'case sensitive, the comparison is determined by Option Compare

'Binary; if not case sensitive, by Option Compare Text.

Function ArrayRowFilter2(InputArray, FilterColumn As Integer, _

FilterValue, Optional Op, Optional MatchCase As Boolean = False)

'This function is virtually identical to ArrayRowFilter1. It is

'provided to facilitate selecting the appropriate number of cells

'when calling multiple filters from the worksheet; the syntax

'is ArrayRowFilter2(ArrayRowFilter1(ArrayRowFilter1...)...)...)

Function ArrayColumnFilter(InputArray, FilterRow, FilterValue)

'This function for filtering columns is

Function ArrayAlternates(InputArray, _

'Optional Odds As Boolean = True,

'Optional RowOrientation As Boolean = True)

'This function returns every odd or even row or

'column, depending on the input arguments. For every

'odd row, the second argument is True (or omitted);

'for every even row, the second argument is False;

'for every odd column, the second argument is True

'(or omitted) and the third is False; for every even column,

'the second argument is False and the third is False.

- vb question paper solvedUploaded bylalitha
- PIC Basic CourseUploaded bytermicas
- Ppl Question BankUploaded byÖmür Eryüksel
- Gd ScriptUploaded byAnthony Prince Merluza
- Arrays,String Handling Functions and PointersUploaded byRahul Kusuma
- 13-pointers.pdfUploaded byadityabaid4
- 1756-pm010_-en-pUploaded byjohn_freddy1
- 2016 Syllabus 12 Computer ScienceUploaded bySamit Basu
- ExcelWorkshop-0408-VLookupUploaded byAayush Suneja
- 33002535_K01_000_11Uploaded byarfeem
- CFX9850GUploaded bywmzdblap
- CalenderUploaded bysuryareddy
- Create InnovusUploaded bysagar
- GOTMUploaded byuemcivil
- PHP Basics Tutorial 01Uploaded byChathura Gunawardhana
- ArrayUploaded byGuturu Dhanesh
- sadUploaded byian kirby bertulfo
- 8310 Sample PaperUploaded byLionel Arthur
- Lab 04Uploaded byJONATHAN TENG ,
- Gpu RecipeUploaded byproxymo1
- Chapter 06 - Answers to Review QuestionsUploaded byusama
- gUploaded bynaresh chowdary
- 1.docxUploaded byReyahLeahMarPulundi
- ms-excel fundamentalsUploaded bygrsrik
- lecture 7Uploaded byMurad Ali
- tuning DS.docxUploaded bydharmawidhi89
- m2 feedbackUploaded bySeth Rothstein
- Mocularization TechniqueUploaded bymithun007reddy
- Subroutines ExplanationUploaded byKabil Rocky
- Optimizing CodeUploaded byRamil Nazareno Espiritu

- How to Prepare for IIIT-Hyderabad PGEE _ Pre&PostGATEUploaded byPrateek Singh
- strategy-and-roadmap-for-solution-manager-session-3.pdfUploaded bymaster_sodhi19
- 01 VAR Support Enablement Program - OKUploaded bydaniel1997campero
- Michael NeesUploaded byrichard gutierrez
- GSM2418AT001-MT2500_AT_Commands (1).pdfUploaded byorlypinos2877
- ODEM.io Technical WhitepaperUploaded bydazeee
- ENG8801-S1-2013Uploaded byMark Shama
- Apple vs ShazamUploaded byMariona
- Edigas Standard Presentation 2009-03-12Uploaded byMarin Draganinsky
- Choosing Authoring Tools v.6Uploaded byddubovoy
- Designing a SwitchbackUploaded byEnrique Cruz Checco
- CMT400 Access Exercise1Uploaded bydiyana
- HandyBookUploaded by森 ロンドン
- SAP FICO Asset Accounting 3Uploaded byAnanthakumar A
- HCL Placement PapersUploaded bySuhin Vimal Raj
- Ocularis Recorder Configuration Manual(3)Uploaded byRodrigo Higuera
- UrlUploaded byFranciele von Muhlen
- pyvisaUploaded byjmigscribd
- SecurityUploaded byAnamika Raj
- GV-EyeV22 ManualUploaded byLasqYar
- ESKO Studio DesignerUploaded bytatopovis
- Community - Competitive Programming - Competitive Programming Tutorials - Recognizing and Representing a GraphUploaded byyash
- ReadMeUploaded byRicardo Guevara
- SRS for Address BookUploaded byAnkita Khuteta
- Topic 8Uploaded bySafinah Hassan
- APRHRCHY_PO Approval HierarchyUploaded byPJ1902
- 46296886.pdfUploaded byRimple Mahey
- Taste Test Puppet Chef SaltStack Ansible Third EditionUploaded byjia11421
- Aironet.1200.Installation.guideUploaded byRobert Ogden
- Calcite ProUploaded byLucas Teixeira