All Questions
4,820 questions
1
vote
1
answer
164
views
I Split a string into an array. The first element is blank/null/empty if the String starts with "BLAK"
I've been coding VBA for 20 years and this has me stumped. I'm testing the code below. If I step through it:
Sub TestSplitting_1()
Dim sColors As String
Dim aColors() As String
Dim sColor As Variant
...
0
votes
1
answer
103
views
How to change Date Format to dd/mm/yyyy from the mm/dd/yyyy in vba?
i am trying to change the date format to dd/mm/yyyy from the mm/dd/yyyy.
It is weird that that only D2 to D7 has this problem, the rest of the column is fine.
Have tried using: Columns("D")....
1
vote
2
answers
92
views
Dynamically updating and doing math on arrays in Excel
I am dynamically populating an array in Excel from another array in a different sheet based on a criteria and was successful in that but now I wish to auto update the returned total based on another ...
2
votes
2
answers
89
views
Array of class module object within class module object
Am trying to learn class modules with arrays.
My old way to store 10 garages that can store 50 cars that have 4 wheels. each wheel have a pressure(psi) and a name like "Dunlop"
'wheels_name(...
4
votes
2
answers
52
views
Compare 2 Lists Return Matches
Just trying compare two lists in columns A B and look for text and integers that are matches in column C. Not sure what function makes sense xlookup or index/match? I only have 2019 excel capabilities....
1
vote
1
answer
37
views
Date Range Large Index/Match Duplicate
The results area is finding the largest top 4 costs in column A within the date range =IFERROR(LARGE(IF(Sheet1!$D$5:$D$4935>=$A$2,IF(Sheet1!$D$5:$D$20<=$B$2,Sheet1!$E$5:$E$20)),1),0)and then ...
-6
votes
1
answer
87
views
Is there an Index, Match, Match formula that can return an array so I can take the average of that array?
I have seen there are already a few questions on Stack that ask questions similarly but not in this particular way....
I am looking to for an Index match match that is able to return an array so I can ...
2
votes
1
answer
125
views
Creating a 2D array, not knowing how big it will be
I create a 2D array, not knowing how big it will be.
I have an array that comes from reading a sheet. This is like my master sheet of all information (about cats in a rescue).
I’m writing a ...
0
votes
2
answers
101
views
Aggregate/Match Conditions Based on Date Range
Need to retrieve matching Date, Type, ID, and reference Cost based on user input Date Range. In Data Set 1 and Data Set 2 inputs are not sorted, and the match conditions need to look at if it falls ...
3
votes
2
answers
48
views
Defining an Array for AutoFilter [duplicate]
Dim arr As Variant
arr = Array("1", "2", "3")
Sheet17.Range("E1").AutoFilter _
Field:=5, _
Criteria1:=arr, _
Operator:=xlFilterValues
This code ...
1
vote
1
answer
74
views
Universal change of all existing elements in a VBA nested array
I have a composite data structure which I have defined using two nested classes. I am presenting a simplified version of the structure here:-
Routine Variable Type
------- -------- ----
...
1
vote
2
answers
66
views
Convert 2-D array to 1-D array & paste 1-D array to another sheet
Cell range starting from region Sheet1.Range("A2") with formulas. "No DATA" string is constant if nothing is pulled as per formula & i don't want it to include in 1-D array ...
0
votes
1
answer
88
views
Comparing a value in Microsoft Excel to a group of cells and displaying corresponding value
I have a task in which I need to compare a value with a certain set of ranges. As shown in the image I want to compare the value in cell B2 to the range of values in from B19 to D30. So for example I ...
0
votes
1
answer
76
views
How can i transfer Visible Filtered Data from a table into a multi dimensional array?
I have a table called "Sales Tracker"
I did an auto filter and got my results.
now i want to transfer the visible fields to my array called soArray
the first time i go thru the cells it ...
0
votes
1
answer
62
views
Pasting an Array to a Column Range in MS Excel Using VBA
Problem: Develop a sub-procedure to paste an array of data into a range of cells (without looping) in an MS excel worksheet.
Note: the functions build_date_array & populate_date_array work ...