Questions tagged [array]
The array tag has no usage guidance.
226
questions
0
votes
0
answers
19
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
13
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
30
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
742
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
0
answers
96
views
How to use cmd to move multiple files via vba code
i would like to use cmd to move multiple files (selected files) from one folder to another folder through VBA code. I wrote successly the vba code to move one file by cmd and then i use the loop to ...
0
votes
1
answer
747
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
535
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
327
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
587
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
28
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
140
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
146
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
405
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
26
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
452
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
37
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
730
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
2k
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
435
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
4k
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
37
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
44
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
739
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
265
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
1
answer
2k
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
283
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
3k
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
3k
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
779
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
41
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
86
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
48
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
852
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
41
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
250
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
66
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
25
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
61
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
407
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
38
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
...
0
votes
1
answer
31
views
Can MS Excel be used to reiteratively check intervals in multiple lines?
I want Excel to check intervals in all the lines in another sheet, finally returning true if my value is in any of those intervals, and fetching a value in that given line if true.
Let's call the ...
1
vote
1
answer
141
views
comm command output in bash versus zsh
In the process of transitioning from bash to zsh. I am comparing the contents of two folders, and echo the files that are common:
common_files=$(comm -12 <(ls -p "$folder1") <(ls -p &...
0
votes
2
answers
523
views
results from array formula disappear when data used by the formula is altered
I am using an array formula to calculate cash flow based on length of memberships and total membership value. This is my formula:
{=IFERROR(IF(MOD(DATEDIF($N8,AB$7,"m"),$S8)=0,IFERROR(...
1
vote
1
answer
276
views
Excel array formula not behaving as expected
I have a little table in EXCEL that uses COUNTIFS to count the number of instances in a dataset that matches four criteria that the user can select from a data validated list in the first four cells ...
3
votes
1
answer
231
views
Excel VBA: Application.Tranpose on an array gives Run-time error 438
I have a VBA code that gets data from a column of a structured table and puts it in a column of another structured table like this:
Dim TopNTickers As Variant
Dim NoOfTickers As Integer
Dim ...
1
vote
1
answer
39
views
Excel Function returning array
I want a UDF that accepts a parameter and returns an array.
Here is my function:
Function UnitSales(ToAdd As Long) As Long()
UnitSales = Array(1 + ToAdd, 2 + ToAdd, 3 + ToAdd)
End Function
I ...
0
votes
1
answer
227
views
Array completely filled with a repeat of the first output value
I used to use that sub where inputs and outputs were on LINE ranges. Everything was working fine.
Then I switched the data to COLUMN ranges. Now the function loops correctly through all the input ...