array

  1. brendalpzm

    Populate an ActiveX combo box according to a List Box values

    I have a ListBox that is filtered by a TextBox, but I want it ot be filter by a ComboBox as well, This means that If the TextBox is filtering specific values, the values shown in the ListBox must be shown in the ComboBox. This is a visual example of it And this is the code that I'm using for...
  2. S

    Dictionary with array as the value

    Hi, I have been battling to understand why an array is not being updated where the array is in place of a key/value pair. I have the following in VBA: Dim testDict As Object Dim testKey As String Dim arr(1) As Double Set testDict = CreateObject("Scripting.Dictionary") testKey = "TestKey" arr(0)...
  3. C

    Can you use an Array within an IF statement, using AND as well?

    Hi All, I have compiled this code, but I want to tidy this up and if possible, have arrays so that it would be easier to add more variables in the future. In a nutshell I want the macro to look at Column AA for anything in the array AND if column AC has a specific text to then give me the...
  4. F

    How to Replace All occurrences in Array?

    Hi all, Having a one dimensional VBA array, is possible to find a list of strings and Replace All occurrences of each string within array?
  5. FuNeS13

    Loop through column titles (1st row) if name is in array

    I know I'm doing something wrong in this part of the code, but I don't know what... Dim MyArray As Variant Dim found As Boolean Dim uB As Integer, lB As Integer Dim LC As Long MyArray = Array("Type", "Number", "Order", "Invoice Date", "Due/Paid Date", "Amount", "Shipment", "Customer"...
  6. P

    Use a range in an array

    I am trying to use a range as the items in an array Using the Microsoft Office Sales data In the cell j3 I have the formula =SUM(SUMIFS($E:$E,$D:$D,"="&J2,$C:$C,{"Jones","Gill"})) Can I write this so that it picks up the names from the cells j6:j7 e.g...
  7. R

    Formula to repeat a value starting at x year and repeating y years

    I am preparing a cashflow model which has a column with years starting at say 2023 going on for several decades. I wish to make a periodic income in the adjacent column that starts in say 2025 then repeats every say 3 years. Could someone help construct a formula for this? The start year, the...
  8. S

    Stacking Multiple Columns ignoring 0 and blanks

    Hi, I was looking at an old topic from 2014 and I am trying to extend an array formula to stack data from 9 columns ignoring 0 and blanks. My workings are in below screenshot; and sample data is as below; ABCDEFGHIJKLMNOPQR11700000002232563Entity 1Entity 2Entity 3Entity 4Entity 5Entity...
  9. brendalpzm

    Copy and paste formulas from a workbook to another without reference with VBA

    I have 3 workbooks, one of them (wb1) has a vba code that copies some formuled cells (a1:c23) in a worksheet from wb2 and copies them in a worksheet in wb3. The thing is that the formulas copied in wb3 are referencing the wb2 instead of wb3, how to copy without this reference?
  10. R

    Binary search and return all matches as an array

    The last argument in XLOOKUP allows performing a binary search but XLOOKUP only returns one match. IF(value=lookup_array,return_array,"") returns all matches in an array but is slow on large lookup ranges/does not do a binary search. Would anyone know a fomula - or combination of - that both...
  11. mehidy1437

    Final code required expert opinion

    Hello dear experts, I am writing to you today to ask for your help in reviewing my code. I have been working on this code for a while now, and I am finally ready. However, I would like to get your feedback on it. I am especially interested in your feedback on the following: The overall...
  12. M

    Using VBA to add digits togeather

    Hello, I am trying to create a function that will let me input a number, and the function will do the following: Add the digits in that number togeather Check if the resulting sum is a single digit (1-9), 11, or 22; Return the number if the #2 is true Start Back at #1 with the new number...
  13. K

    Not understanding syntax of fso

    Hello, I'm trying to refer to a textfile and set that as an array, but i'm met with an error when trying to refer to ThisWorkbook.Path (Bad file name or number) And I don't understand how to fix it. I'm using the same type of argument to open/refer to a Workbook, and this works just fine. I'm...
  14. K

    How do i populate an Array from another array

    Hello, I'm having troubles figuring this out. I have an external Array in a notepad, where there are a Bunch of strings. I Want to make a new Array from a line from this Array. Say "Arr(0)" contains the following:1 2 3 4 5 6 7 8 From there I want a new array (lets call it nArr) that can...
  15. mehidy1437

    Working with variant array

    Hello dear, I have data in a2:f5, a1:f1 is header row. a2:c5 contain the details like style, order & color d2:f5 contain the quantity. I would like to perform the calculation on d2:f5. d2:f5 each cell will divided by 30, like 100/30=3.333 so for d2 it will be 100/30=3.3333, in d2 cell value...
  16. R

    comparing array - finding how many kits can be made from existing inventory

    Hi all, I have inventory stock details with 11,000 part count and I am making vehicle from this inventory. Now for one vehicle I require 1300 to 1500 parts with varying quantity on each part. there will be multiple vehicle codes I want to create a crisp VBA where it will show me 1) how many...
  17. T

    Using VBA to Copy and Paste a 2D Array in Excel

    I have code I am developing where source data exists from column A to L starting at row 7. Separately, an output field based on that data exists in column M. Goals of Code: 1) Import all data into an Array named "DataSet" 2) If any data exists in column M: 2a) Delete all data including...
  18. F

    Array of numbers - from Application.InputBox

    I'm using this to create an array of numbers. The example array is shown below. Instead of entering {1,2,3,4,5,6,7,8,9,10,100,2000} ... wanted to input something like "1-10,100,2000". Is this possible? Sub arr_from_input() Dim arr_num As Variant Dim i As Long arr_num =...
  19. Wad Mabbit

    I want to return a list of headers wherever there is a value match in column N. Where TRUE exists in any row of a column, that header is returned plus

    I want to return a list of headers in column R wherever there is a value match in column N. Column n contains extracted phone numbers, which I use as ID's Where TRUE exists in any row of a column AB to AK, that header (AB1 .. AK1)) is returned plus a line break, for each of columns AB:AK...
  20. Z

    Copy multiple sheets to new workbook using dynamic array

    Hello Everyone, When I click a button on a sheet within my workbook, I want a macro to do the following: Copy all the sheets named in cell “AA1” to a new workbook (I’m having trouble getting a dynamic array to work for this). If the array needs each sheet name in a different cell, I can put...

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