Questions tagged [array]
The array tag has no usage guidance.
233
questions
0
votes
3
answers
24
views
PowerShell - Number in non-sequential range check failing
I have a list of digits, some sequential, some with breaks. Here is an example.
(1..10),12,15,(30..45),50,53
When I try and query whether "my number" is in this list – let's say it's 4 – all ...
0
votes
1
answer
69
views
How do I Iterate over an array of spaced string pairs in zsh?
I was reading the post here and tried out the solutions.
However, the following does not produce any output. What am I missing?
arr=( '102 351' '576 324' '427 321' )
for str in "$arr[@]"; ...
0
votes
0
answers
36
views
Referencing and evaluating another cell's array formula to create master array using VSTACK, in Excel without VBA/Macros
I'm trying to accomplish this task in Excel without VBA, Macros, or Power Query.
Here is a workbook with example sheets of data, an intermediate sheet, and a sheet showing the desired outcome: https://...
3
votes
1
answer
316
views
Debian Bash Associative Array Self (Internal) Referencing
I'm attempting to contruct an associative array where key-value pairs within the array, reference other key-value pairs in the same array, using Debian Gnu-Linux 12.4, 22.12.3 and Bash 5.2.15.
Example,...
3
votes
0
answers
159
views
Is there a good way to write a shell script compatible with both bash and zsh that addresses array elements?
The fact that bash is 0-indexed and zsh is 1-indexed can cause problems. For example the following will work as intended with bash, but not zsh (PS I am aware that I don't NEED to use an array for ...
0
votes
0
answers
35
views
Value change upon assigning data from array to range
I'm writing back my data from an array to range.
The variables stored in array are of Variant/String type:
20.00
20.99
etc.
But when they are put into range (formatted as General), the values are:
20,...
0
votes
1
answer
220
views
Dynamic Array Subtotal that changes its column sizes without using VBA or volatile functions
I need to make a dynamic array subtotal that changes its column size by another dynamic array. The example sheet, challenge, conditions, and attempts I've made are below.
[Example Sheet]
Challenge:
...
0
votes
0
answers
68
views
batch writing and reading Multidemsional Array
I have edited an example as good to a multi dimensional array.
There was a mistake in the origanl example. Ive corrected it
Data for sentinels.txt:
127.0.0.1 loopback
192.168.100.102 printer
@ECHO OFF
...
0
votes
0
answers
85
views
How to write a macro that iterates an array of strings and displays one of them at any given time in LibreOffice Impress?
I teach Spelling at an elementary school. To make class more entertaining, I decided to add interactive content.
In this example, students are given a presentation. The picture in the slide is an ...
0
votes
1
answer
45
views
Dragging down values from array referenced using table column
Let's say I have an excel table I called People and it has 3 columns (Name, Age, Height).
Now I want to create another table (let's call it Job) where one of the columns is also Name, and I want to ...
0
votes
1
answer
77
views
look for empty cell between non empty cells in one row and then put 0
enter image description here enter image description here
A B C
abc 30 40
def 4646
ghi 45 3234
So, I want to write a macro code where it takes all three columns into consideration at once....
0
votes
1
answer
2k
views
Powershell with "array dimensions exceeded supported range" error close to 1GB file size
I have a simple Powershell script example below:
$dpath = "D:\Fill"
$mask="000000"
$sizefile = 1GB
$numfiles = 10
#file mask will be "file_000000 " = 12 chars total
$...
0
votes
1
answer
800
views
Getting array from POSTMAN API, split values it into variables and send request to server
I'm getting an array through POST method in my postman API and after getting I am trying to split the array and then assign each array value to a variable, storing it in the XML code and sending that ...
0
votes
1
answer
2k
views
Indirectly compare two arrays in Excel
Let's say I have the following two differently sized arrays in Excel:
array_1
array_2
A
A
B
C
D
E
E
I want to write a function COMPARE(array_1, array_2) where this returns (as an array) all of ...
0
votes
1
answer
536
views
Checking for string match in bash script command line arguments
I'm clearly missing something basic and would love some enlightenment. I've seen numerous posts about seeing if your bash command line arguments match a string. However, I can't get things to work ...
0
votes
1
answer
1k
views
Excel use formula to produce a conditional comma-separated list
I have a dataset in which the right 5 columns indicate with a Y/N if each row applies to that option of 5 potential options:
I am looking to add one final column that uses a formula to check for each ...
0
votes
1
answer
37
views
INDEX MATCH with multiple matches. Find the MAX match
I ran a GIS operation that provided me with a table to show the 3 closest lengths of pipe to a valve. Main line pipe comes in 12,8,6 & 4 inch sizes and outputs to 4,3 & inch lateral lines.
I ...
0
votes
2
answers
282
views
How do I create an array in excel using the "coordinate" values of each cell?
Sorry if this is trivial, but I can't seem to get this to work. I have a column of values, say from A2 to A10, and a row of values, say from B1 to P1. I want to fill out the values of the array from ...
0
votes
1
answer
258
views
Using INDEX/XMATCH to pass an array through to AGGREGATE in Excel resulting in #Value! error when trying to get MEDIAN
I have a row of companies in an array to the right. Using INDEX() + XMATCH(), I check the company names against a table and pull out the corresponding ratios (decimal number). This creates a spilled ...
0
votes
1
answer
670
views
How to Create a Spilling Array that Takes a Rolling Average
Reversing the order of the dates works, but I'm more interested in knowing how to do it in this specific way. I'm trying to take a rolling average, ideally it would be nice to change the depth from a ...
0
votes
0
answers
35
views
How can I temporarily create an external Spanned drive big enough to make a backup of another external 5 TB HDD which seems to have been unallocated
I have a Dell laptop 2n1 running Win 11 which I use as a desktop (never leaves my desk) and had a 5 TB WD Elements HDD that I was using for backup's, as well as secondary storage for large media files ...
0
votes
2
answers
737
views
Excel nested dynamic array formula, filtering distinct differences only
I'm working with a big dataset with many types of products to be uploaded to Shopify
In order for the correct dropdown(s) to be displayed, I have to let Shopify know what the "children" (...
0
votes
1
answer
158
views
Compound COUNTIFS with LEFT used in an array
I'm trying to count instances of differing occurrences that must meet a string criteria, then also filter by timespan against a date time string in one block. I need to leave the worksheet intact and ...
2
votes
2
answers
953
views
How to return multiple match results and output them to a cell as concatenated text?
Suppose I have the following data:
A
B
C
D
1
val1
Str1
2
ValM
Str2
3
val2
Str3
4
ValM
Str4
5
ValM
Str5
6
val3
Str6
7
ValM
Str7
8
val4
Str8
9
val5
Str9
10
ValM
Str10
I would like to:
find ...
2
votes
2
answers
7k
views
Excel MEDIAN across ARRAY with multiple conditionals using IF and AND functions
I want to determine a MEDIAN of values in one column based on meeting conditions in two other columns. I'm using MS Excel.
I know I have to process the MEDIAN function as an ARRAY (ctrl + shft + enter)...
0
votes
2
answers
598
views
Excel VBA - Dynamic Array not Working
I am trying to make an array that stores all of the values in Column A from "Workbook B" so I can then reference and see if a cell's value is in that array in Column A from "Workbook A&...
1
vote
1
answer
5k
views
How to set and use a variable from an array value in a DOS/Windows batch file
In a DOS/Windows batch file, how can I set/use a variable from an array and a loop index, such that I can produce output like what's shown below?
SETLOCAL ENABLEDELAYEDEXPANSION
set x[0]=one
set x[1]=...
0
votes
1
answer
38
views
Finding unique codes based on lowest values
I've been trying to find a solution to this for a long time in many places and couldn't find it.
Here's a description:
I have a table of changeover times between products. I'd like to create a list ...
0
votes
2
answers
53
views
Find last 2 values & calculate % change
I need to calculate the percent change for the last 2 cells (months). The last 2 cells change monthly, with new data added. I need the formula to find the last 2 cells--with value--in the row, and ...
0
votes
2
answers
944
views
Indent of array in method in phpStorm
phpStorm is formatting arrays in method calls like this (auto code formatting):
$address = new Address([
'full_name' => $fullname,
]);
I expect it ...
0
votes
0
answers
283
views
Bash check array membership with regex
I have just started bash scripting as of this morning, so forgive me for my less-than-adequate skills.
I have a GitHub action where I scp files which have changed on a push event to the production ...
5
votes
1
answer
2k
views
ZSH iterate through string array containing spaces
I am trying to write a ZSH script which will iterate through a series of strings that contain spaces.
First, I'll set -A the array:
set -A a "this is" "a test" "of the" &...
0
votes
2
answers
5k
views
How to append a value to an array in Excel
I have a formula, which returns an array. I would like to append another value to this array. Is there any way to do this with a formula without VBA in Excel?
e.g.
{1, 2, 3} -> {1, 2, 3, 4}
or ...
0
votes
1
answer
423
views
Return column headers as array (no blank rows) if column sum is not zero
I have a table with columns of components needed to create various products. This table is populated automatically as output data from another table.
For this example, we'll use this one:
S Widgets
M ...
0
votes
1
answer
4k
views
Splitting Multi-valued JSON elements into an Array with PowerShell
I'm working with some JSON data in PowerShell. Some elements are multi-valued, delimited with a semi-colon, but its not always the same elements that are multi-valued. I would like to convert multi-...
1
vote
2
answers
4k
views
Script to disable/enable PnP Device using InstanceID's - but the ID's change upon reboot
I have a working script to disable 4 usb joysticks using their respective InstanceID's
$pnpIds = 'HID\VID_0079&PID_0006\7&1699A0E&198&0000', 'HID\VID_0079&PID_0006\7&5438EB5&...
0
votes
1
answer
1k
views
Excel: AGGREGATE function with an array
I'm referring to the data below, and I would like to calculate a conditional mean:
2
0
#N/A
0
0
0
0
-2
20
0
25
0
0
0
0
0
0
0
0
0
154
25
0
120
0
0
0
0
0
-2
2
0
0
0
0
0
0
0
0
0
57
0
-57
1299
0
0
0
0
0
#...
0
votes
0
answers
131
views
Array formula to return true across multiple dates combined with if "sepecific text"= true
I am trying a formula that is sets out dates for a week and lists jobs on each day based on the days they are booked in. the array formula is designed to look up data on my current sheet (cell A1) on ...
0
votes
0
answers
134
views
Power Query to extract JSON parameter values from the data
Hope you are doing well!...I am trying to split the different parameter values for just the correct ,added and removed codes at a vbillid level..In the attached excel file the column codemap has the ...
0
votes
1
answer
60
views
compare values in excel and highlight the leading number in B1
how do i compare column A which has repeats data against column B which has numbers and highlight the leading number. since the data has no patterns, not quiet getting it, Please help.
0
votes
1
answer
1k
views
How do I count the number of times a value appears in a 2D array in excel while also having a date condition that varies by row
I'm trying to create a function that calculates the number of times a specific text value appears in a 2D array, while also meeting a conditional that is unique to each row.
Essentially its just a ...
1
vote
0
answers
66
views
Sum of array in one cell produces different result from sum of the array elements
I want to do a simple calculation (say, addition) on a set of values on the basis of some keys, as in:
Col A Col B Col C Col D Col E
Row 1 **Key** **...
0
votes
1
answer
320
views
PowerShell: Array of Arrays
I have files with the following structure:
c:\root\dir1\001 (BRP-01 Some) Text.tif
c:\root\dir2\002 (BRP-01 Some Different) Text.tif
c:\root\dir3\001 (BRP-01 Some) Text.tif
...
Ultimately, I want to ...
0
votes
1
answer
73
views
How to count the frequency of numbers that meet certain criteria e.g. ISODD and > 50 in Excel
What is the Excel formula to count the frequency of numbers occurring in a list against some criteria. E.g. how many odd numbers are in the list, how many even numbers are there with values > 50 or ...
1
vote
0
answers
34
views
SUM IF with multiple conditions in the same collumn
How to make this work in libre office Calc?
=SUM(SUMIF(Aug.N$2:N$400, {"ED","EDS","CS"},Aug.AD$2:AD$400))
1
vote
2
answers
76
views
Sum Numbers Up to First "/"
I have an array of numbers like this:
114/114
142/137
79/79
60/59
69/69
132/132
1/1
I need to total the numbers before and after the "/", ending up with 597/591. Is this possible in Excel ...
0
votes
1
answer
489
views
Inserting Array Formula with VBA
I am trying to insert an array formula using VBA but I keep getting the error
"Unable to set the FormulaArray property of the Range class"
Sub Insert()
Range("J2").Select
...
0
votes
0
answers
40
views
Index with Multiple Returns
I am trying to create a formula that will take a value from A2, A3, A4 etc and search another spreadsheet to return multiple values based on what is in A2, I have managed to create an array formula as ...
2
votes
1
answer
1k
views
Batch: Unable to assign an array to a variable
I am not able to assign an array to a variable:
set persons[0].FirstName=Richard
set persons[0].lastName=DuponT
set persons[1].FirstName=Romain
set persons[1].lastName=DuponD
set x=0
REM Works:
call ...
0
votes
1
answer
1k
views
Keep getting "Index out of range" error
So I primarily use java and C++ and VBA is very new to me. I'm very confused as to why I keep getting error 9 - "Index out of range". Here is the code:
Dim count As Integer
Dim j As Integer
...