qid int64 4 8.14M | question stringlengths 20 48.3k | answers list | date stringlengths 10 10 | metadata list | input stringlengths 12 45k | output stringlengths 2 31.8k |
|---|---|---|---|---|---|---|
165,039 | <p>I'm trying to eliminate (not hide) the column headings from the following QUERY(). The output from the =QUERY() must be in a single row.</p>
<pre><code>=QUERY(myData!A:G, "Select SUM(E), SUM(F) WHERE D ='"&E11&"'")
</code></pre>
<p>The current output is shown in images #1 and #2 below. Th... | [
{
"answer_id": 165040,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 0,
"selected": false,
"text": "<p>try this one:</p>\n<pre><code>=QUERY(myData!A:G, "Select SUM(E), SUM(F) WHERE D ='"&E11&&qu... | 2022/06/11 | [
"https://webapps.stackexchange.com/questions/165039",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/51806/"
] | I'm trying to eliminate (not hide) the column headings from the following QUERY(). The output from the =QUERY() must be in a single row.
```
=QUERY(myData!A:G, "Select SUM(E), SUM(F) WHERE D ='"&E11&"'")
```
The current output is shown in images #1 and #2 below. The desired output is shown in image #3. Thanks for an... | To remove headers, you should refer to the data range `A2:G` rather than the full columns `A:G`, and explicitly set the `headers` parameter to zero.
Additionally, you need to use the `label` clause to omit automatic headers in any aggregated columns, like this:
```
=query(
myData!A$2:G,
"select sum(E), sum(F)
... |
165,174 | <p>I have a google sheet with data that contains a column that is mixed both with text and numbers. I want to filter all to see which have numbers greater or equal to $500,000.</p>
<p>or which column have the format of '$ Volume: $xxx,xxx' that is >= $500,000.</p>
<p>Example of my data column D:</p>
<p>$xx $100.00 J... | [
{
"answer_id": 165175,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>To highlight matching rows in the sheet directly, use this <a href=\"https://support.google.com/docs/answ... | 2022/06/20 | [
"https://webapps.stackexchange.com/questions/165174",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/297075/"
] | I have a google sheet with data that contains a column that is mixed both with text and numbers. I want to filter all to see which have numbers greater or equal to $500,000.
or which column have the format of '$ Volume: $xxx,xxx' that is >= $500,000.
Example of my data column D:
$xx $100.00 Jul 15 2022 Daily $ Volum... | I replied over on reddit, but either of these will do it
```
=ARRAYFORMULA(
FILTER(
{A2:A,D2:D},
--REGEXEXTRACT(D2:D,"Volume: (.*) Volume"))
```
or if you want to use your filter views, use this in another column
```
=ARRAYFORMULA(
IF(ISBLANK(A2:A),,
--REGEXEXTRACT(D2:D,"Volume: (.*) Volume")>=500000))... |
165,197 | <p>Today my Gmail accounts on two different laptops both failed to be connected by the local outlook apps on Mac.</p>
<p>Outlook popped up a Gmail log-in window but after logging in I was always presented with this message:</p>
<p><a href="https://i.stack.imgur.com/FHxeC.png" rel="nofollow noreferrer"><img src="https:/... | [
{
"answer_id": 165198,
"author": "Peter",
"author_id": 297163,
"author_profile": "https://webapps.stackexchange.com/users/297163",
"pm_score": -1,
"selected": false,
"text": "<p>I have same issue across multiple domains - all mac client versions of outlook talking to Gmail account - pc v... | 2022/06/22 | [
"https://webapps.stackexchange.com/questions/165197",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/114022/"
] | Today my Gmail accounts on two different laptops both failed to be connected by the local outlook apps on Mac.
Outlook popped up a Gmail log-in window but after logging in I was always presented with this message:
[](https://i.stack.imgur.com/FHxeC.p... | Same exact issue this morning. Was fine last night. Logging directly into Gmail versus Outlook seems to be ok so its def between Outlook and Gmail. Hope someone finds the answer ! |
165,257 | <p>I had a bunch of exercises listed on a sheet named 'exercise sheet', each in its own category. On a different sheet (my programming sheet), I used the formula</p>
<pre><code>=unique('exercise list'!B3:B)
</code></pre>
<p>to pull out the category type once from that exercise sheet. see screenshots.</p>
<p>However, I ... | [
{
"answer_id": 165258,
"author": "adam waldron",
"author_id": 297287,
"author_profile": "https://webapps.stackexchange.com/users/297287",
"pm_score": -1,
"selected": false,
"text": "<p>successfully used a flatten function. however, as you can see it is including blank cells now. how do i... | 2022/06/26 | [
"https://webapps.stackexchange.com/questions/165257",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/297287/"
] | I had a bunch of exercises listed on a sheet named 'exercise sheet', each in its own category. On a different sheet (my programming sheet), I used the formula
```
=unique('exercise list'!B3:B)
```
to pull out the category type once from that exercise sheet. see screenshots.
However, I then wanted to make the exerci... | It's still not entirely clear to me where you want a formula. I *think* you want it in 'Programme Sheet'!C8. If that is the case, delete that formula and replace it with the following:
`=UNIQUE(QUERY({'Exercise split into columns (not working)'!B3:B;'Exercise split into columns (not working)'!E3:E;'Exercise split into... |
165,313 | <p>Imagine you have a google sheet which lists your favorite shops, types of shirts they have, and their price in separate columns. To find out which store has which shirts, you wish to filter out all shirts sold by each store into separate sheets. Example sheets are at the bottom of this post.</p>
<p>I have tried usin... | [
{
"answer_id": 165282,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>Use <code>filter()</code>, like this:</p>\n<p><code>=filter(Names!B2:B, Names!A2:A = "Jane")</c... | 2022/06/29 | [
"https://webapps.stackexchange.com/questions/165313",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/297431/"
] | Imagine you have a google sheet which lists your favorite shops, types of shirts they have, and their price in separate columns. To find out which store has which shirts, you wish to filter out all shirts sold by each store into separate sheets. Example sheets are at the bottom of this post.
I have tried using both QU... | Use `filter()`, like this:
`=filter(Names!B2:B, Names!A2:A = "Jane")`
To put all matching names in one cell with separators between, use `join()`, like this:
`=join( ", ", filter(Names!B2:B, Names!A2:A = "Jane") )` |
165,340 | <p>The solution is sketched in <a href="https://webapps.stackexchange.com/questions/127393/how-can-i-prevent-editors-from-accessing-the-script-editor-in-google-sheets">this post</a>, but it seems key steps are not identified.
This code works fine if in GAS bound to the spreadsheet:</p>
<pre><code>function onEdit(e) {
... | [
{
"answer_id": 165347,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>You are trying to prevent spreadsheet editors from accessing your code. <a href=\"https://developers.goog... | 2022/06/30 | [
"https://webapps.stackexchange.com/questions/165340",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/297502/"
] | The solution is sketched in [this post](https://webapps.stackexchange.com/questions/127393/how-can-i-prevent-editors-from-accessing-the-script-editor-in-google-sheets), but it seems key steps are not identified.
This code works fine if in GAS bound to the spreadsheet:
```
function onEdit(e) {
var sheet = e.sou... | `onEdit` is a reserved keyword used for naming a simple trigger. This kind of trigger can only be used on bounded scripts and on Editor add-ons.
As you are using a standalone project, and assuming that your script is only relevant for a single spreadsheet, instead of using a simple trigger you might use an installable... |
165,449 | <p>I am reconciling my monthly expenses. I have a Google sheet tab that is summing monthly transaction totals for each vendor from a list of transactions that is located on another tab.</p>
<p>I'd like to easily identify all of the transactions that have been included in the vendor sums so that I know which remaining t... | [
{
"answer_id": 165347,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>You are trying to prevent spreadsheet editors from accessing your code. <a href=\"https://developers.goog... | 2022/07/06 | [
"https://webapps.stackexchange.com/questions/165449",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/297738/"
] | I am reconciling my monthly expenses. I have a Google sheet tab that is summing monthly transaction totals for each vendor from a list of transactions that is located on another tab.
I'd like to easily identify all of the transactions that have been included in the vendor sums so that I know which remaining transactio... | `onEdit` is a reserved keyword used for naming a simple trigger. This kind of trigger can only be used on bounded scripts and on Editor add-ons.
As you are using a standalone project, and assuming that your script is only relevant for a single spreadsheet, instead of using a simple trigger you might use an installable... |
165,547 | <p><a href="https://i.stack.imgur.com/dlvgn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dlvgn.png" alt="enter image description here" /></a></p>
<p>I have two columns. The first one records when a signup happens (with the time), and the second one is a simple date increment that should count how ... | [
{
"answer_id": 165347,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>You are trying to prevent spreadsheet editors from accessing your code. <a href=\"https://developers.goog... | 2022/07/13 | [
"https://webapps.stackexchange.com/questions/165547",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/157200/"
] | [](https://i.stack.imgur.com/dlvgn.png)
I have two columns. The first one records when a signup happens (with the time), and the second one is a simple date increment that should count how many signups happened within that day.
For example, for `2022... | `onEdit` is a reserved keyword used for naming a simple trigger. This kind of trigger can only be used on bounded scripts and on Editor add-ons.
As you are using a standalone project, and assuming that your script is only relevant for a single spreadsheet, instead of using a simple trigger you might use an installable... |
165,638 | <p>I have a date field, where I would like to do some conditional formatting.</p>
<p>So, if the date is more than 2 weeks ago AND the neighboring cells contains the words "Open" or Reminder" I would like the date cell to have a red background.</p>
<p>Unfortunately I can't get any formula to work. Any hel... | [
{
"answer_id": 165640,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Assuming that <code>Open</code> and <code>Reminder</code> may be in some cells of column <code>A</code> and t... | 2022/07/19 | [
"https://webapps.stackexchange.com/questions/165638",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/291191/"
] | I have a date field, where I would like to do some conditional formatting.
So, if the date is more than 2 weeks ago AND the neighboring cells contains the words "Open" or Reminder" I would like the date cell to have a red background.
Unfortunately I can't get any formula to work. Any help would be appreciated. | Assuming that `Open` and `Reminder` may be in some cells of column `A` and the dates are in column `B`, this formula applied to the conditional formatting of column B should solve your problem:
```
=and(or(A2="open",A2="reminder"),today()>=B2+14,B2<>"" )
```
[link to the test file](https://docs.google.com/spreadshee... |
165,671 | <p>How can I extract the website title name only from one cell and auto paste it in another cell in Google Sheets?</p>
<p>I have a spreadsheet where we are constantly adding URLs from multiple different websites & we need to then manually input what website its for.</p>
<p>For example:</p>
<p>google.com/jhsdgfjkhsg... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/21 | [
"https://webapps.stackexchange.com/questions/165671",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/298414/"
] | How can I extract the website title name only from one cell and auto paste it in another cell in Google Sheets?
I have a spreadsheet where we are constantly adding URLs from multiple different websites & we need to then manually input what website its for.
For example:
google.com/jhsdgfjkhsgd in A1, I need to manual... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,675 | <p>I have a CSV file with 16 columns.</p>
<p>The first 10 (A-J) are contact information, the last 6 are different phone numbers, sometimes for the same contact.</p>
<p>My objective is to create duplicates of the first 10 columns with the new 11th column (K labeled PHONE) representing one phone number from the last 6 co... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/21 | [
"https://webapps.stackexchange.com/questions/165675",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/298419/"
] | I have a CSV file with 16 columns.
The first 10 (A-J) are contact information, the last 6 are different phone numbers, sometimes for the same contact.
My objective is to create duplicates of the first 10 columns with the new 11th column (K labeled PHONE) representing one phone number from the last 6 columns.
I am lo... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,811 | <p><a href="https://i.stack.imgur.com/8B3bd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8B3bd.png" alt="" /></a></p>
<p>So what I am trying to do is copy cells from the "Tasks and Responsibilities" column that are next to the boxes that are checked, and paste them into another sheet.</p... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/28 | [
"https://webapps.stackexchange.com/questions/165811",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/298843/"
] | [](https://i.stack.imgur.com/8B3bd.png)
So what I am trying to do is copy cells from the "Tasks and Responsibilities" column that are next to the boxes that are checked, and paste them into another sheet.
For example: I want all of the tasks that are next to Dawn's checked boxe... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,833 | <p><a href="https://docs.google.com/spreadsheets/d/1hmgiKlSKmKPOE1ZVN70b6icgyU27IWoYrjE76OdnnEU/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1hmgiKlSKmKPOE1ZVN70b6icgyU27IWoYrjE76OdnnEU/edit?usp=sharing</a></p>
<p>How can I simply copy A4:D4 to A5:D5 but maintaining relative refere... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/29 | [
"https://webapps.stackexchange.com/questions/165833",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/298908/"
] | <https://docs.google.com/spreadsheets/d/1hmgiKlSKmKPOE1ZVN70b6icgyU27IWoYrjE76OdnnEU/edit?usp=sharing>
How can I simply copy A4:D4 to A5:D5 but maintaining relative references 24 rows down on the Data! sheet.
In other words: I am wanting to extract the time of High per day and Low per day from Data!
Data sheet i... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,839 | <p>I'm trying to create a formula that meets the following conditions:</p>
<ul>
<li>If any of the cells is 0, then just show 0</li>
<li>If none of the cells equals 0, then show the lowest number of those cells</li>
</ul>
<p>So let's say A1 has a value of 2; A5 is 3 and A13 is 0, then I want the formula to show "0&... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/29 | [
"https://webapps.stackexchange.com/questions/165839",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/298920/"
] | I'm trying to create a formula that meets the following conditions:
* If any of the cells is 0, then just show 0
* If none of the cells equals 0, then show the lowest number of those cells
So let's say A1 has a value of 2; A5 is 3 and A13 is 0, then I want the formula to show "0".
On the other hand, if A1 is 2, A5 is... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,858 | <p>Please, imagine the following scenario.
Document consists of 2 sheets: sheet1, sheet2.
Sheet1 has 4 cells filled in. A1, A2, B1, B2. Bonjour, S'il vous plaît, Merci, De rien - all 4 cells are in French.
Sheet2 has 4 cells filled in. A1 = googletranslate(Sheet1!A1). Next, it is dragged to autofill.
So, we have nice a... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/30 | [
"https://webapps.stackexchange.com/questions/165858",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/296442/"
] | Please, imagine the following scenario.
Document consists of 2 sheets: sheet1, sheet2.
Sheet1 has 4 cells filled in. A1, A2, B1, B2. Bonjour, S'il vous plaît, Merci, De rien - all 4 cells are in French.
Sheet2 has 4 cells filled in. A1 = googletranslate(Sheet1!A1). Next, it is dragged to autofill.
So, we have nice auto... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,861 | <p>This is the link to a Google Spreadsheet for use in a fishing club.</p>
<p><a href="https://docs.google.com/spreadsheets/d/17xFDHoF_-3Kg7jVrxiIRjBJy-DD70RFg6wPf19fQC50/edit#gid=943629989" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/17xFDHoF_-3Kg7jVrxiIRjBJy-DD70RFg6wPf19fQC50/edit#gid=943629989<... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/07/30 | [
"https://webapps.stackexchange.com/questions/165861",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/298945/"
] | This is the link to a Google Spreadsheet for use in a fishing club.
<https://docs.google.com/spreadsheets/d/17xFDHoF_-3Kg7jVrxiIRjBJy-DD70RFg6wPf19fQC50/edit#gid=943629989>
When the fishing tournament starts, all the names of the competetors (Leden) en their seat (zitplaatsen) can be selected from a list and are bein... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,909 | <p><a href="https://docs.google.com/spreadsheets/d/e/2PACX-1vTyyem2spUQAi44lPN3rk_AQiE1J-OS2nQtJbASYadyXZ8WmjHR-yNjY1fH2jRwttyUiOPtf6uL3xBs/pubhtml" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/e/2PACX-1vTyyem2spUQAi44lPN3rk_AQiE1J-OS2nQtJbASYadyXZ8WmjHR-yNjY1fH2jRwttyUiOPtf6uL3xBs/pubhtml</a></p>
<... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/08/02 | [
"https://webapps.stackexchange.com/questions/165909",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/299080/"
] | <https://docs.google.com/spreadsheets/d/e/2PACX-1vTyyem2spUQAi44lPN3rk_AQiE1J-OS2nQtJbASYadyXZ8WmjHR-yNjY1fH2jRwttyUiOPtf6uL3xBs/pubhtml>
I'd like to be able to click and drag to auto-populate the cells instead of having to F2 each cell and have to change each date. The D4 cell looks like ='8/1'!$V$49, I'd love to be ... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
165,938 | <p>I have the following spreadsheet:</p>
<p><a href="https://i.stack.imgur.com/zshk4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zshk4.png" alt="Spreadsheet" /></a></p>
<p>For column B, the formula is simple: B1 + (B1 * A2)</p>
<p>The question is: how to get the numbers in column C?</p>
<p>I manu... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/08/04 | [
"https://webapps.stackexchange.com/questions/165938",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/17703/"
] | I have the following spreadsheet:
[](https://i.stack.imgur.com/zshk4.png)
For column B, the formula is simple: B1 + (B1 \* A2)
The question is: how to get the numbers in column C?
I manually typed all values on column C but the idea is if I type 24200 on C1, it cal... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
166,055 | <p>I am trying to create a running column array that counts the number of occurrences by person by week. It can't be a pivot table or separate array table but a calculated column that updates beside the raw data. I think I need a combination of a array, vlookup, and query but am not sure how to do it.</p>
<p>Here is an... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/08/12 | [
"https://webapps.stackexchange.com/questions/166055",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/299589/"
] | I am trying to create a running column array that counts the number of occurrences by person by week. It can't be a pivot table or separate array table but a calculated column that updates beside the raw data. I think I need a combination of a array, vlookup, and query but am not sure how to do it.
Here is an example ... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
166,063 | <p>I'm creating a new account for my wife, and I"m stuck at this robot puzzle. EAch time I solve it it just sends me back to solbing it again. I tried different browsers, different emails, different sites (outlook and hotmail), different computers, tried cleaning cache, doing it from incognito mode etc.
When searc... | [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/08/12 | [
"https://webapps.stackexchange.com/questions/166063",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/299595/"
] | I'm creating a new account for my wife, and I"m stuck at this robot puzzle. EAch time I solve it it just sends me back to solbing it again. I tried different browsers, different emails, different sites (outlook and hotmail), different computers, tried cleaning cache, doing it from incognito mode etc.
When searching the... | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
166,113 | <p>I'm using numbers to categorize items in a list, each with a $ amount.</p>
<p>Column A has a number, 1-15, depending on the item in column B. Column C has the cost of the item in column B.</p>
<p>I want to find the total cost of all the items with the number 1, same for number 2, and so on.</p>
| [
{
"answer_id": 165674,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>Try with this formula, placed in <code>B2</code>:</p>\n<pre><code>=index(regexreplace(A1:A,"\\..+",... | 2022/08/16 | [
"https://webapps.stackexchange.com/questions/166113",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/299719/"
] | I'm using numbers to categorize items in a list, each with a $ amount.
Column A has a number, 1-15, depending on the item in column B. Column C has the cost of the item in column B.
I want to find the total cost of all the items with the number 1, same for number 2, and so on. | Try with this formula, placed in `B2`:
```
=index(regexreplace(A1:A,"\..+",""))
```
1. the regular\_expression `\..+` selects all text from dot to end
2. the `regexreplace()` function replaces that selection with empty
3. the `index()` function applies that formula to all the links of column A
if all your urls have... |
166,194 | <p>In my Sheets projects I often have to write values at the end of the sheet programmatically. I use data validations, some of which don't accept invalid values. My problem is that if a write operation fails, I end up with an incomplete input. I want my operations to either succeed 100% or not at all.</p>
<p>Suppose I... | [
{
"answer_id": 166196,
"author": "Rubén",
"author_id": 88163,
"author_profile": "https://webapps.stackexchange.com/users/88163",
"pm_score": 0,
"selected": false,
"text": "<p>There are several workarounds, depending on your spreadsheet in-cell data validation rules you might have to use ... | 2022/08/21 | [
"https://webapps.stackexchange.com/questions/166194",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/246911/"
] | In my Sheets projects I often have to write values at the end of the sheet programmatically. I use data validations, some of which don't accept invalid values. My problem is that if a write operation fails, I end up with an incomplete input. I want my operations to either succeed 100% or not at all.
Suppose I have a s... | Solution: Simply add rows before initializing the range. This way I can access the validation rules.
```
const sheet = ss.getActiveSheet();
const dataRange = sheet.getDataRange();
const firstRow = dataRange.getNumRows() + 1;
sheet.insertRowsAfter(dataRange.getNumRows(), values.length);
const range = sheet.getRange(fir... |
166,200 | <p>I am creating a rota on Google sheets and I am looking to highlight a name whenever that name comes up more than 6 times within a 13 column window.</p>
<p>At the moment the formula is =COUNTIF($B4:$Z4,"Louis")>6
But I only want the name highlighted if it appears 6 times within any 13 columns that are ad... | [
{
"answer_id": 166196,
"author": "Rubén",
"author_id": 88163,
"author_profile": "https://webapps.stackexchange.com/users/88163",
"pm_score": 0,
"selected": false,
"text": "<p>There are several workarounds, depending on your spreadsheet in-cell data validation rules you might have to use ... | 2022/08/21 | [
"https://webapps.stackexchange.com/questions/166200",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300058/"
] | I am creating a rota on Google sheets and I am looking to highlight a name whenever that name comes up more than 6 times within a 13 column window.
At the moment the formula is =COUNTIF($B4:$Z4,"Louis")>6
But I only want the name highlighted if it appears 6 times within any 13 columns that are adjacent (i.e it appears... | Solution: Simply add rows before initializing the range. This way I can access the validation rules.
```
const sheet = ss.getActiveSheet();
const dataRange = sheet.getDataRange();
const firstRow = dataRange.getNumRows() + 1;
sheet.insertRowsAfter(dataRange.getNumRows(), values.length);
const range = sheet.getRange(fir... |
166,218 | <p>I have several columns of data, where I would like to display a summary table in rows, such that when more columns are added it's easy to add more summary fields by filling down.</p>
<p>Example data:</p>
<p>Data columns:</p>
<pre><code> K L M N
1 10 20 30 40
2 5 10 15 20
etc.
</code><... | [
{
"answer_id": 166196,
"author": "Rubén",
"author_id": 88163,
"author_profile": "https://webapps.stackexchange.com/users/88163",
"pm_score": 0,
"selected": false,
"text": "<p>There are several workarounds, depending on your spreadsheet in-cell data validation rules you might have to use ... | 2022/08/22 | [
"https://webapps.stackexchange.com/questions/166218",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/131801/"
] | I have several columns of data, where I would like to display a summary table in rows, such that when more columns are added it's easy to add more summary fields by filling down.
Example data:
Data columns:
```
K L M N
1 10 20 30 40
2 5 10 15 20
etc.
```
Summary rows:
```
A
1... | Solution: Simply add rows before initializing the range. This way I can access the validation rules.
```
const sheet = ss.getActiveSheet();
const dataRange = sheet.getDataRange();
const firstRow = dataRange.getNumRows() + 1;
sheet.insertRowsAfter(dataRange.getNumRows(), values.length);
const range = sheet.getRange(fir... |
166,222 | <p>I resell good online and track the profits on google sheets. I use a different sheet for each category of goods. I want to create a summary sheet that extracts the daily profits from all the sheets for all my sales for each date so that I can see how much I made every day w/o having to manually do it. I can figure o... | [
{
"answer_id": 166229,
"author": "David Tan",
"author_id": 293022,
"author_profile": "https://webapps.stackexchange.com/users/293022",
"pm_score": 1,
"selected": false,
"text": "<pre><code>=QUERY("ledger-tab-name:A1:K, "SELECT A, SUM(K) GROUP BY A", 1)\n</code></pre>\n<p>T... | 2022/08/22 | [
"https://webapps.stackexchange.com/questions/166222",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300105/"
] | I resell good online and track the profits on google sheets. I use a different sheet for each category of goods. I want to create a summary sheet that extracts the daily profits from all the sheets for all my sales for each date so that I can see how much I made every day w/o having to manually do it. I can figure out ... | Assuming you used 2 sheets (`Tables!` and `Chairs!`), the formula could be this:
```
=QUERY({Tables!A1:K;Chairs!A1:K}, "SELECT Col1, SUM(Col11) where Col1 is not null GROUP BY Col1",1)
```
*put each different sheet between the 2 curly brackets, separated by semicolons*.
Note that you can place the formula in any ce... |
166,314 | <p>I have a very long story in Google Docs that contains dialog. I just realized that all the quotation marks that I entered using my laptop are "<a href="https://developers.google.com/style/quotation-marks#straight-and-curly-quotation-marks" rel="nofollow noreferrer">smart quotes</a>" (curly). And all the qu... | [
{
"answer_id": 166315,
"author": "kmote",
"author_id": 13139,
"author_profile": "https://webapps.stackexchange.com/users/13139",
"pm_score": 1,
"selected": false,
"text": "<p>I finally found a way to do this and wanted to share it with others who might have the same problem. This answers... | 2022/08/28 | [
"https://webapps.stackexchange.com/questions/166314",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/13139/"
] | I have a very long story in Google Docs that contains dialog. I just realized that all the quotation marks that I entered using my laptop are "[smart quotes](https://developers.google.com/style/quotation-marks#straight-and-curly-quotation-marks)" (curly). And all the quotations that I entered using my android phone are... | I finally found a way to do this and wanted to share it with others who might have the same problem. This answers relies on using the "regular expression" functionality in the Advanced Search. Specifically, it uses so-called "lookbehind" and "lookahead" syntax ([described more fully here](https://writersdiscord.com/usi... |
166,366 | <p>I am sure this is available somewhere but K could not figure out how to make it - I am looking to create a summary based on a keyfield. Rather than be confusing, here is what I am working with and what I hope to achieve?</p>
<hr />
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>DATE</th>
<... | [
{
"answer_id": 166315,
"author": "kmote",
"author_id": 13139,
"author_profile": "https://webapps.stackexchange.com/users/13139",
"pm_score": 1,
"selected": false,
"text": "<p>I finally found a way to do this and wanted to share it with others who might have the same problem. This answers... | 2022/08/31 | [
"https://webapps.stackexchange.com/questions/166366",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300579/"
] | I am sure this is available somewhere but K could not figure out how to make it - I am looking to create a summary based on a keyfield. Rather than be confusing, here is what I am working with and what I hope to achieve?
---
| DATE | STAFF | COLLECTED | SHARES | CREDIT | DEBIT |
| --- | --- | --- | --- | --- | --- |
... | I finally found a way to do this and wanted to share it with others who might have the same problem. This answers relies on using the "regular expression" functionality in the Advanced Search. Specifically, it uses so-called "lookbehind" and "lookahead" syntax ([described more fully here](https://writersdiscord.com/usi... |
166,392 | <p>so I am very ameature in google sheets. I am an artist and I am organizing stock. In google sheets I have title, price, medium, sold/not sold, etc... I have print series that go up to 100. for example "hummingbird 1/100" then the next row is
"hummingbird 2/100" the next is
"hummingbird... | [
{
"answer_id": 166315,
"author": "kmote",
"author_id": 13139,
"author_profile": "https://webapps.stackexchange.com/users/13139",
"pm_score": 1,
"selected": false,
"text": "<p>I finally found a way to do this and wanted to share it with others who might have the same problem. This answers... | 2022/09/02 | [
"https://webapps.stackexchange.com/questions/166392",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300643/"
] | so I am very ameature in google sheets. I am an artist and I am organizing stock. In google sheets I have title, price, medium, sold/not sold, etc... I have print series that go up to 100. for example "hummingbird 1/100" then the next row is
"hummingbird 2/100" the next is
"hummingbird 3/100" and I am trying to create ... | I finally found a way to do this and wanted to share it with others who might have the same problem. This answers relies on using the "regular expression" functionality in the Advanced Search. Specifically, it uses so-called "lookbehind" and "lookahead" syntax ([described more fully here](https://writersdiscord.com/usi... |
166,442 | <p><strong>TL;DR:</strong> How do I make a summarise-cell, that automatically sums from itself until an empty cell?</p>
<hr />
<p>I'm working on a budget, looking like this:</p>
<p><a href="https://i.stack.imgur.com/RXq58.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RXq58.png" alt="SUM section" />... | [
{
"answer_id": 166443,
"author": "Zeth",
"author_id": 200715,
"author_profile": "https://webapps.stackexchange.com/users/200715",
"pm_score": -1,
"selected": false,
"text": "<p>Change the <code>=SUM(...)</code>-statement, to include the empty cell in the bottom.</p>\n<p>When adding a new... | 2022/09/04 | [
"https://webapps.stackexchange.com/questions/166442",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/200715/"
] | **TL;DR:** How do I make a summarise-cell, that automatically sums from itself until an empty cell?
---
I'm working on a budget, looking like this:
[](https://i.stack.imgur.com/RXq58.png)
It has happened several times, where I've added a new row in the bottom, but ... | The solution is to DYNAMICALLY expand the range to be added, so this is better:
```
=SUM(INDIRECT("B4:B" & MATCH("daily stuff", A1:A, 0) -1 ))
```
which will take into account any other cell of `column B` that will precede the "daily stuff" group
[](https://i.stack.imgur.c... |
166,449 | <p>I have two sheets in my Google spreadsheet: Meal Plan and Recipes.</p>
<p>Meal Plan looks like this:</p>
<p><a href="https://i.stack.imgur.com/ayTpo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ayTpo.png" alt="enter image description here" /></a></p>
<p>Recipes looks like this:</p>
<p><a href="... | [
{
"answer_id": 166450,
"author": "Matt W",
"author_id": 33942,
"author_profile": "https://webapps.stackexchange.com/users/33942",
"pm_score": 0,
"selected": false,
"text": "<p>I have placed this formula in the D column cells:</p>\n<pre><code>=textjoin(", ",true,filter(Recipes!$... | 2022/09/05 | [
"https://webapps.stackexchange.com/questions/166449",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/33942/"
] | I have two sheets in my Google spreadsheet: Meal Plan and Recipes.
Meal Plan looks like this:
[](https://i.stack.imgur.com/ayTpo.png)
Recipes looks like this:
[](https://i.stack.im... | Select all cells of the Ingredients column from the Recipes sheet using the FILTER() function by the condition "the Meal column is exactly equal to the selected value in cell C4". Combine the filtering result into one string with TEXTJOIN() function. To make the formula work only for the selected values and ignore empt... |
166,524 | <p>I am new to Google sheet formula and need some help from the community.</p>
<p>I have two tabs from a spreadsheet, A and B:</p>
<ul>
<li>Both tabs basically have the same number of columns (col1, col2 and col3) except that col3 of B is all empty</li>
<li>In terms of records, A is a subset of B. All the records in A ... | [
{
"answer_id": 166522,
"author": "Alex Potrafke",
"author_id": 300956,
"author_profile": "https://webapps.stackexchange.com/users/300956",
"pm_score": 1,
"selected": false,
"text": "<p>I figured out that if I write the equation once using the terms in my case =c6 + (200 * a7) I can drag ... | 2022/09/09 | [
"https://webapps.stackexchange.com/questions/166524",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300971/"
] | I am new to Google sheet formula and need some help from the community.
I have two tabs from a spreadsheet, A and B:
* Both tabs basically have the same number of columns (col1, col2 and col3) except that col3 of B is all empty
* In terms of records, A is a subset of B. All the records in A should have matching recor... | I figured out that if I write the equation once using the terms in my case =c6 + (200 \* a7) I can drag the square at the bottom of the cell and google sheets will repeat the pattern. |
166,678 | <p>I thought this would be simple but having a hard time searching because when I look up something like "find value in range with multiple columns" all I get back is how to search for multiple criteria, like first and last names, or an address.</p>
<p>I've got a named range (lets call it <code>letterTiers</c... | [
{
"answer_id": 166682,
"author": "The God of Biscuits",
"author_id": 293686,
"author_profile": "https://webapps.stackexchange.com/users/293686",
"pm_score": 1,
"selected": true,
"text": "<p>If you've got the above table in A1:F4 of a sheet, then the following formula performs the lookup ... | 2022/09/17 | [
"https://webapps.stackexchange.com/questions/166678",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/301353/"
] | I thought this would be simple but having a hard time searching because when I look up something like "find value in range with multiple columns" all I get back is how to search for multiple criteria, like first and last names, or an address.
I've got a named range (lets call it `letterTiers`) where each row is a tier... | If you've got the above table in A1:F4 of a sheet, then the following formula performs the lookup you want. For instance:
```
=arrayformula(vlookup("eee",query(split(flatten(B2:F4&"|"&A2:A4),"|"),"where Col2 is not null"),2,false))
```
N.B. I can't quite work out what your named range actually corresponds to, so I'v... |
166,757 | <p>I working on google sheets files where any special case character (any character other than [a-z,A-Z,0-9] ) is forbidden so to confirm this condition is true I need to check that every character in the cell isn't equal to any special case character.</p>
| [
{
"answer_id": 166682,
"author": "The God of Biscuits",
"author_id": 293686,
"author_profile": "https://webapps.stackexchange.com/users/293686",
"pm_score": 1,
"selected": true,
"text": "<p>If you've got the above table in A1:F4 of a sheet, then the following formula performs the lookup ... | 2022/09/21 | [
"https://webapps.stackexchange.com/questions/166757",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/301527/"
] | I working on google sheets files where any special case character (any character other than [a-z,A-Z,0-9] ) is forbidden so to confirm this condition is true I need to check that every character in the cell isn't equal to any special case character. | If you've got the above table in A1:F4 of a sheet, then the following formula performs the lookup you want. For instance:
```
=arrayformula(vlookup("eee",query(split(flatten(B2:F4&"|"&A2:A4),"|"),"where Col2 is not null"),2,false))
```
N.B. I can't quite work out what your named range actually corresponds to, so I'v... |
166,761 | <p>I am looking for a formula I can put into Google Sheets that finds the 1st, 2nd, and 3rd largest values in column B, but has to be associated with a number 1 in column A. Problem is, column A does have some blank cells, which I can not fill in.</p>
<p>A B
1 $1,000
$2,000
1 $3,000
1 $4,000</p>
| [
{
"answer_id": 166682,
"author": "The God of Biscuits",
"author_id": 293686,
"author_profile": "https://webapps.stackexchange.com/users/293686",
"pm_score": 1,
"selected": true,
"text": "<p>If you've got the above table in A1:F4 of a sheet, then the following formula performs the lookup ... | 2022/09/21 | [
"https://webapps.stackexchange.com/questions/166761",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/301531/"
] | I am looking for a formula I can put into Google Sheets that finds the 1st, 2nd, and 3rd largest values in column B, but has to be associated with a number 1 in column A. Problem is, column A does have some blank cells, which I can not fill in.
A B
1 $1,000
$2,000
1 $3,000
1 $4,000 | If you've got the above table in A1:F4 of a sheet, then the following formula performs the lookup you want. For instance:
```
=arrayformula(vlookup("eee",query(split(flatten(B2:F4&"|"&A2:A4),"|"),"where Col2 is not null"),2,false))
```
N.B. I can't quite work out what your named range actually corresponds to, so I'v... |
166,961 | <p>I need help with Google Sheets to search part of a cell within a range. My formula works in Microsoft Excel but not in Google Sheets:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
</tr>
</thead>
<tbody>
<tr>
<td>dog</td>
<td>this cat is very friendly</td>
<... | [
{
"answer_id": 166970,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>try this formula:</p>\n<pre><code>=index(query(if(iserror(search(A1:A,B1)),,A1:A),"where Col1 <>''... | 2022/10/04 | [
"https://webapps.stackexchange.com/questions/166961",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/302146/"
] | I need help with Google Sheets to search part of a cell within a range. My formula works in Microsoft Excel but not in Google Sheets:
| A | B | C |
| --- | --- | --- |
| dog | this cat is very friendly | =LOOKUP(REPT("z",255),CHOOSE({1,2,3},"",LOOKUP(9.99999999999999E+307,SEARCH(A1:A4,B1),A1:A4))) |
| cat | | |
| co... | try this formula:
```
=index(query(if(iserror(search(A1:A,B1)),,A1:A),"where Col1 <>''"))
``` |
167,092 | <p>I'm working on a spreadsheet (in google sheets) for tracking characters' magical abilities.</p>
<p><a href="https://i.stack.imgur.com/Do3Ui.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Do3Ui.jpg" alt="Chart of characters. In Column A characters' names are listed. Column B is the one I need help... | [
{
"answer_id": 166970,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>try this formula:</p>\n<pre><code>=index(query(if(iserror(search(A1:A,B1)),,A1:A),"where Col1 <>''... | 2022/10/10 | [
"https://webapps.stackexchange.com/questions/167092",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/302452/"
] | I'm working on a spreadsheet (in google sheets) for tracking characters' magical abilities.
[](h... | try this formula:
```
=index(query(if(iserror(search(A1:A,B1)),,A1:A),"where Col1 <>''"))
``` |
167,114 | <p>I have a sheet that I am trying to get an If statement to work. Col B is our hidden stock column and we have three variables that need to be return in COL C:</p>
<ol>
<li>It has a quantity of 0-9 so the stock shows the exact number in that column</li>
<li>It has a quantity of 10 or more so it shows 10+</li>
<li>It i... | [
{
"answer_id": 166970,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>try this formula:</p>\n<pre><code>=index(query(if(iserror(search(A1:A,B1)),,A1:A),"where Col1 <>''... | 2022/10/11 | [
"https://webapps.stackexchange.com/questions/167114",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/302518/"
] | I have a sheet that I am trying to get an If statement to work. Col B is our hidden stock column and we have three variables that need to be return in COL C:
1. It has a quantity of 0-9 so the stock shows the exact number in that column
2. It has a quantity of 10 or more so it shows 10+
3. It is a product that has mov... | try this formula:
```
=index(query(if(iserror(search(A1:A,B1)),,A1:A),"where Col1 <>''"))
``` |
167,139 | <p>Hey thanks for checking this out for me. Here's my <a href="https://docs.google.com/spreadsheets/d/1XUTPaz_a7BK0h6S_fN5QaDNjhps9W-YM2qBz_ew8fnw/edit#gid=0" rel="nofollow noreferrer">sheet</a></p>
<p>A2:D6 is a simplified dataset I have. I need a formula to create the unique and ordered sets in F2:G4.</p>
<p>FYI: Ove... | [
{
"answer_id": 167144,
"author": "David Tan",
"author_id": 293022,
"author_profile": "https://webapps.stackexchange.com/users/293022",
"pm_score": 3,
"selected": true,
"text": "<p>We first need all the Unique values in Column 1. We can do that very easily with the <code>UNIQUE</code> fun... | 2022/10/12 | [
"https://webapps.stackexchange.com/questions/167139",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/302572/"
] | Hey thanks for checking this out for me. Here's my [sheet](https://docs.google.com/spreadsheets/d/1XUTPaz_a7BK0h6S_fN5QaDNjhps9W-YM2qBz_ew8fnw/edit#gid=0)
A2:D6 is a simplified dataset I have. I need a formula to create the unique and ordered sets in F2:G4.
FYI: Over time, the letters will grow to D, E, F, etc. | We first need all the Unique values in Column 1. We can do that very easily with the `UNIQUE` function.
```
=UNIQUE(A2:A)
```
Note that we are starting from A2, and not A1 to avoid including the header.
Next, the actual values.
```
=REGEXREPLACE(
TEXTJOIN(
",",
TRUE,
QUERY(
... |
167,183 | <p>Example file: <a href="https://docs.google.com/spreadsheets/d/1iESk7ccWBKBLE6Q00P9AxH3GbOYPO9PysySGbbQljjI/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1iESk7ccWBKBLE6Q00P9AxH3GbOYPO9PysySGbbQljjI/edit?usp=sharing</a></p>
<p>I have a table showing how many times each player used... | [
{
"answer_id": 167144,
"author": "David Tan",
"author_id": 293022,
"author_profile": "https://webapps.stackexchange.com/users/293022",
"pm_score": 3,
"selected": true,
"text": "<p>We first need all the Unique values in Column 1. We can do that very easily with the <code>UNIQUE</code> fun... | 2022/10/15 | [
"https://webapps.stackexchange.com/questions/167183",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/302721/"
] | Example file: <https://docs.google.com/spreadsheets/d/1iESk7ccWBKBLE6Q00P9AxH3GbOYPO9PysySGbbQljjI/edit?usp=sharing>
I have a table showing how many times each player used each item. For each player, I want to identify the X items they used most frequently (3 in the example). The results need to be the names of the it... | We first need all the Unique values in Column 1. We can do that very easily with the `UNIQUE` function.
```
=UNIQUE(A2:A)
```
Note that we are starting from A2, and not A1 to avoid including the header.
Next, the actual values.
```
=REGEXREPLACE(
TEXTJOIN(
",",
TRUE,
QUERY(
... |
167,228 | <p>I have been working on this problem for a week, where I was looking for the totals of specific row items in a range multiplied by a factor. The formula below achieves the desired outcome. I need help structuring it in an arrayformula to accept multiple columns.</p>
<p>This formula works as is and with an IF statemen... | [
{
"answer_id": 167236,
"author": "JohnSUN",
"author_id": 297772,
"author_profile": "https://webapps.stackexchange.com/users/297772",
"pm_score": 1,
"selected": false,
"text": "<p>Welcome!\nIt seems to me that you are completely unnecessarily complicating the task with additional checks u... | 2022/10/18 | [
"https://webapps.stackexchange.com/questions/167228",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/302861/"
] | I have been working on this problem for a week, where I was looking for the totals of specific row items in a range multiplied by a factor. The formula below achieves the desired outcome. I need help structuring it in an arrayformula to accept multiple columns.
This formula works as is and with an IF statement.
=ARRAY... | Welcome!
It seems to me that you are completely unnecessarily complicating the task with additional checks using IF (). In fact, you only need one condition: whether a particular row in 'MHC System Material QTY'!$A$16:$A$72 refers to the corresponding position in 'Lookup Table '. Simply multiply each Cost column (colum... |
167,376 | <p>I have this local JavaScript function to sort the way I'm describing:</p>
<pre><code>const lines = ['foo', 'bing', 'world', 'baz', 'hello', 'bar', 'blank']
.sort((a, b) => {
const len = a.length - b.length
if (len) return len
return a.localeCompare(b)
})
</code></pre>
<p>It will return:</p>
<pre>... | [
{
"answer_id": 167379,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 0,
"selected": false,
"text": "<p>I think you may import the table as an array in the script (.getValues()), then adapt the formula you have pas... | 2022/10/26 | [
"https://webapps.stackexchange.com/questions/167376",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/139439/"
] | I have this local JavaScript function to sort the way I'm describing:
```
const lines = ['foo', 'bing', 'world', 'baz', 'hello', 'bar', 'blank']
.sort((a, b) => {
const len = a.length - b.length
if (len) return len
return a.localeCompare(b)
})
```
It will return:
```
['bar', 'baz', 'foo', 'bing', '... | Have you run a script before?
If not, open App Script in this menu: [](https://i.stack.imgur.com/pIcyz.jpg)
Paste the code there, save it and run it a first time to accept the permissions. I suggest you follow the instructions from 8:30 in this video: <https://youtu.be/... |
167,390 | <p>I'm working on this spreadsheet, field B10.</p>
<p><a href="https://docs.google.com/spreadsheets/d/1wC-y0T9QeF6MZALavljzqVLJTfadSHmGt0yOFYgIMnE/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1wC-y0T9QeF6MZALavljzqVLJTfadSHmGt0yOFYgIMnE/edit?usp=sharing</a></p>
<p>I'd like to apply... | [
{
"answer_id": 167395,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>Your pseudo code example:</p>\n<pre><code>IF B10=TRUE AND B5=TRUE, THEN C10xG6 \nBUT \nIF B10=TRUE AND B5=... | 2022/10/26 | [
"https://webapps.stackexchange.com/questions/167390",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303193/"
] | I'm working on this spreadsheet, field B10.
<https://docs.google.com/spreadsheets/d/1wC-y0T9QeF6MZALavljzqVLJTfadSHmGt0yOFYgIMnE/edit?usp=sharing>
I'd like to apply this formula, but I'm not sure how:
```
IF B10=TRUE AND B5=TRUE, THEN C10xG6
BUT
IF B10=TRUE AND B5=FALSE, THEN C10*F6.
IF B10=FALSE, " ".
```
Any h... | I believe this formula is more understandable and adherent to the request for a beginner:
```
=ifs(
and(B10=TRUE , B5=TRUE) , C10*G6,
and(B10=TRUE ,B5=FALSE) , C10*F6,
B10=FALSE, ""
)
``` |
167,422 | <p>In cell A1 I have this date and time: <code>2022-01-01 16:00</code></p>
<p>If I do this <code>=Year(A1)-1</code> the result is as expected <code>2021</code></p>
<p>If I do this <code>=TEXT((Year(A1)-1), "YY")</code> the answer is <code>05</code></p>
<p>Can anyone explain what is happening?</p>
| [
{
"answer_id": 167395,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>Your pseudo code example:</p>\n<pre><code>IF B10=TRUE AND B5=TRUE, THEN C10xG6 \nBUT \nIF B10=TRUE AND B5=... | 2022/10/27 | [
"https://webapps.stackexchange.com/questions/167422",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/237810/"
] | In cell A1 I have this date and time: `2022-01-01 16:00`
If I do this `=Year(A1)-1` the result is as expected `2021`
If I do this `=TEXT((Year(A1)-1), "YY")` the answer is `05`
Can anyone explain what is happening? | I believe this formula is more understandable and adherent to the request for a beginner:
```
=ifs(
and(B10=TRUE , B5=TRUE) , C10*G6,
and(B10=TRUE ,B5=FALSE) , C10*F6,
B10=FALSE, ""
)
``` |
167,444 | <p>I have =INT(B8-NOW())currently running in a cell to show me the remaining days in the month (B8 being a date)</p>
<p>I want to know if there is a way that the output number can calculate only working days, currently showing me just the remaining days. I have tried to search here for a similar question but can't see ... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/10/28 | [
"https://webapps.stackexchange.com/questions/167444",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303406/"
] | I have =INT(B8-NOW())currently running in a cell to show me the remaining days in the month (B8 being a date)
I want to know if there is a way that the output number can calculate only working days, currently showing me just the remaining days. I have tried to search here for a similar question but can't see any.
TIA | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,452 | <p>I'm trying to build a chart within google sheets to compare my portfolio contributions vs yearly allowed maximum limits. My data looks like the below. I'm not sure which chart to make use of to visualize this information. I would like to generate a chart that lets me compare these two values each year and each accou... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/10/29 | [
"https://webapps.stackexchange.com/questions/167452",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303422/"
] | I'm trying to build a chart within google sheets to compare my portfolio contributions vs yearly allowed maximum limits. My data looks like the below. I'm not sure which chart to make use of to visualize this information. I would like to generate a chart that lets me compare these two values each year and each account.... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,460 | <p>Suppose I have this <a href="https://docs.google.com/spreadsheets/d/10-n5ksYvvGnfdnrRJChVM7Q0cwQ7EClb4GJvKDmKN80/edit?usp=sharing" rel="nofollow noreferrer">sheet</a> showing which group (1, 2 or 3) each student joined on each day of class. Column B indicates in which group he/she last showed up, which is obtained b... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/10/29 | [
"https://webapps.stackexchange.com/questions/167460",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303441/"
] | Suppose I have this [sheet](https://docs.google.com/spreadsheets/d/10-n5ksYvvGnfdnrRJChVM7Q0cwQ7EClb4GJvKDmKN80/edit?usp=sharing) showing which group (1, 2 or 3) each student joined on each day of class. Column B indicates in which group he/she last showed up, which is obtained by using the following formula :
`=INDEX... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,466 | <p>So I have a cell with this trick in it to prevent the TODAY() function from updating every day:</p>
<p>IF(C1=0,TODAY(),C1)</p>
<p>Works perfectly for its purpose. However I have other cells with formulas that refer to this cell and it doesn't behave properly. I know for certain it's this cell that's causing the issu... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/10/30 | [
"https://webapps.stackexchange.com/questions/167466",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303469/"
] | So I have a cell with this trick in it to prevent the TODAY() function from updating every day:
IF(C1=0,TODAY(),C1)
Works perfectly for its purpose. However I have other cells with formulas that refer to this cell and it doesn't behave properly. I know for certain it's this cell that's causing the issue but I can't d... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,468 | <p>I have a table</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Name</th>
<th>Salary</th>
<th>Desc2</th>
<th>Desc3</th>
</tr>
</thead>
<tbody>
<tr>
<td>ABC</td>
<td>9</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>ABC</td>
<td>9</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>ABC</td>
<td>9</td>
<td... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/10/30 | [
"https://webapps.stackexchange.com/questions/167468",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/301682/"
] | I have a table
| Name | Salary | Desc2 | Desc3 |
| --- | --- | --- | --- |
| ABC | 9 | X | X |
| ABC | 9 | X | X |
| ABC | 9 | X | X |
| XYZ | 4 | Y | Y |
| PQR | 1 | Z | Z |
| PQR | 1 | Z | Z |
| PQR | 1 | Z | Z |
I want it something like :-
| Name | Salary | Desc2 | Desc3 |
| --- | --- | --- | --- |
| ABC | 27 | X... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,471 | <p>In Google Sheets, it seems that masking an odd number of rows in a range somehow defeats the alternate color formatting (adjacent rows will occur with identical colors). Is there a workaround using, e.g. conditional formatting instead?</p>
| [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/10/30 | [
"https://webapps.stackexchange.com/questions/167471",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303441/"
] | In Google Sheets, it seems that masking an odd number of rows in a range somehow defeats the alternate color formatting (adjacent rows will occur with identical colors). Is there a workaround using, e.g. conditional formatting instead? | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,509 | <p>I am tracking a percentage over time, adding a new column every week. I'd like to track the most recent six percentages as an average.</p>
<p>When I add a new column, even a cell reference locked with a $ changes.</p>
<p>For other numbers, ones that are not percentages, I'm successfully using INDIRECT. But for perce... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/11/01 | [
"https://webapps.stackexchange.com/questions/167509",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303550/"
] | I am tracking a percentage over time, adding a new column every week. I'd like to track the most recent six percentages as an average.
When I add a new column, even a cell reference locked with a $ changes.
For other numbers, ones that are not percentages, I'm successfully using INDIRECT. But for percentages, I'm get... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,519 | <p>I have a data set where 1 of the columns contains dates in "YYYY-MM-DD" format. I'd like to use a single query formula to select some columns from that data set, including the date column. That's not an issue, however I'd also like to use the same/one formula to add an extra column to the output converti... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/11/01 | [
"https://webapps.stackexchange.com/questions/167519",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/269420/"
] | I have a data set where 1 of the columns contains dates in "YYYY-MM-DD" format. I'd like to use a single query formula to select some columns from that data set, including the date column. That's not an issue, however I'd also like to use the same/one formula to add an extra column to the output converting the existing... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,550 | <p>To be super clear when I add a new social link with @oneManDev on Facebook it automatically gets rid of the @ sign so when the user clicks on the link it redirects to <a href="https://youtube.com/oneManDev" rel="nofollow noreferrer">https://youtube.com/oneManDev</a> instead of <a href="https://youtube.com/@oneManDev... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/11/03 | [
"https://webapps.stackexchange.com/questions/167550",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303657/"
] | To be super clear when I add a new social link with @oneManDev on Facebook it automatically gets rid of the @ sign so when the user clicks on the link it redirects to <https://youtube.com/oneManDev> instead of <https://youtube.com/@oneManDev> which leads to Page not found error. | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,613 | <p>I found some very simple Apps Script code online that scans for a set value (MONDAY) in a Google sheets cell and then changes the color of the cell if it finds a match.</p>
<p>I am trying to modify the code to change color of the entire row if it finds a match, not just the individual cell.</p>
<p>I used the logger ... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/11/06 | [
"https://webapps.stackexchange.com/questions/167613",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303787/"
] | I found some very simple Apps Script code online that scans for a set value (MONDAY) in a Google sheets cell and then changes the color of the cell if it finds a match.
I am trying to modify the code to change color of the entire row if it finds a match, not just the individual cell.
I used the logger to determine th... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,639 | <p>Feels like a combination of <code>COUNTIF</code> plus <code>COUNTIFS</code> and I can't quite wrap my head around it.</p>
<p>I've used <code>=ArrayFormula(SUM(COUNTIF(A:A,{"Value1", "Value2"})))</code> to count either or scenarios. <code>COUNTIFS</code> for counting when column A has a given valu... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/11/08 | [
"https://webapps.stackexchange.com/questions/167639",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/303675/"
] | Feels like a combination of `COUNTIF` plus `COUNTIFS` and I can't quite wrap my head around it.
I've used `=ArrayFormula(SUM(COUNTIF(A:A,{"Value1", "Value2"})))` to count either or scenarios. `COUNTIFS` for counting when column A has a given value AND column B has another value.
But now I need: when A has a value1 AN... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,687 | <p>I Have an xlsx in spreadsheet and there is a cell with an expression <code>=IF(test,mot,"?")</code>. I would like to know what is hidden in the logical expression.</p>
<p><a href="https://i.stack.imgur.com/FVVfp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FVVfp.png" alt="introducir l... | [
{
"answer_id": 167445,
"author": "CodeCamper",
"author_id": 232528,
"author_profile": "https://webapps.stackexchange.com/users/232528",
"pm_score": 1,
"selected": false,
"text": "<p>These functions already exist in google sheets and excel to accomplish this exact problem:</p>\n<pre><code... | 2022/11/11 | [
"https://webapps.stackexchange.com/questions/167687",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/141930/"
] | I Have an xlsx in spreadsheet and there is a cell with an expression `=IF(test,mot,"?")`. I would like to know what is hidden in the logical expression.
[](https://i.stack.imgur.com/FVVfp.png)
I tried to convert it to a Google Sheet an... | These functions already exist in google sheets and excel to accomplish this exact problem:
```
Networkdays and Eomonth
```
You will use eomonth to specify the last day of the month in the second parameter of networkdays and also networkdays has an optional third parameter for a table of holidays |
167,693 | <p>I'm trying to create a spreadsheet for my team, and using this script I am only getting one of the on edit if statements to function. How can I fix this? I'm not very versed in script writing.</p>
<pre><code>function onEdit(e) {
const sh=e.range.getSheet();
if(sh.getName()=='Confirmation Check' && e.rang... | [
{
"answer_id": 167695,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 0,
"selected": false,
"text": "<p>You should check the openings and endings of the if and else cycles, that was why it wasn't working. Try this:... | 2022/11/11 | [
"https://webapps.stackexchange.com/questions/167693",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/304060/"
] | I'm trying to create a spreadsheet for my team, and using this script I am only getting one of the on edit if statements to function. How can I fix this? I'm not very versed in script writing.
```
function onEdit(e) {
const sh=e.range.getSheet();
if(sh.getName()=='Confirmation Check' && e.range.columnStart==8 && e... | Use `Range.offset()` to get the next cell to the right, and observe [onEdit(e) best practices](https://webapps.stackexchange.com/a/155429/269219), like this:
```
/**
* Simple trigger that runs each time the user hand edits the spreadsheet.
*
* @param {Object} e The onEdit() event object.
*/
function onEdit(e) {
if (... |
167,733 | <p>I have a formula that counts people's absences weekly (Monday - Sunday). How can I change it so that it counts absences Thursday - Wednesday instead?
Sheet: <a href="https://docs.google.com/spreadsheets/d/12mLK6wf9s2NnNya67oWb9cgujSQuKEA73AfAZoxsgek/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com... | [
{
"answer_id": 167695,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 0,
"selected": false,
"text": "<p>You should check the openings and endings of the if and else cycles, that was why it wasn't working. Try this:... | 2022/11/14 | [
"https://webapps.stackexchange.com/questions/167733",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/297974/"
] | I have a formula that counts people's absences weekly (Monday - Sunday). How can I change it so that it counts absences Thursday - Wednesday instead?
Sheet: <https://docs.google.com/spreadsheets/d/12mLK6wf9s2NnNya67oWb9cgujSQuKEA73AfAZoxsgek/edit?usp=sharing>
The formula in question is in 'Weekly Summary'!C4 | Use `Range.offset()` to get the next cell to the right, and observe [onEdit(e) best practices](https://webapps.stackexchange.com/a/155429/269219), like this:
```
/**
* Simple trigger that runs each time the user hand edits the spreadsheet.
*
* @param {Object} e The onEdit() event object.
*/
function onEdit(e) {
if (... |
167,775 | <h2>Scenario:</h2>
<ul>
<li>I have a Google Sheets spreadsheet which contains two sheets: Sheet1, Sheet2</li>
<li>Sheet1 has lots of data. Sheet2 is empty.</li>
</ul>
<h2>I want to:</h2>
<ul>
<li>Import all of the data from Sheet1 into Sheet2.</li>
<li>Since Data in Sheet 1 is updating continuously, I need to mirror it... | [
{
"answer_id": 167776,
"author": "ric_cde",
"author_id": 304345,
"author_profile": "https://webapps.stackexchange.com/users/304345",
"pm_score": -1,
"selected": false,
"text": "<p>The solution seems to be using the QUERY() function rather than IMPORTRANGE (which is for external data acce... | 2022/11/17 | [
"https://webapps.stackexchange.com/questions/167775",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/304345/"
] | Scenario:
---------
* I have a Google Sheets spreadsheet which contains two sheets: Sheet1, Sheet2
* Sheet1 has lots of data. Sheet2 is empty.
I want to:
----------
* Import all of the data from Sheet1 into Sheet2.
* Since Data in Sheet 1 is updating continuously, I need to mirror it and reflect new rows or columns.... | To bulk copy values within a spreadsheet file, use an [{ array expression }](https://support.google.com/docs/answer/6208276), like this:
```
={ Sheet1!A1:Z }
``` |
167,777 | <p><code>=index(split("A (2)"," "),2)</code> renders as <code>-2</code> even when cell number format is set to "Plain text". It also breaks further functions like <code>REGEXREPLACE</code> that expects text, not a number.</p>
<p><a href="https://support.google.com/docs/thread/3725183/how-c... | [
{
"answer_id": 167776,
"author": "ric_cde",
"author_id": 304345,
"author_profile": "https://webapps.stackexchange.com/users/304345",
"pm_score": -1,
"selected": false,
"text": "<p>The solution seems to be using the QUERY() function rather than IMPORTRANGE (which is for external data acce... | 2022/11/17 | [
"https://webapps.stackexchange.com/questions/167777",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/9457/"
] | `=index(split("A (2)"," "),2)` renders as `-2` even when cell number format is set to "Plain text". It also breaks further functions like `REGEXREPLACE` that expects text, not a number.
[This thread](https://support.google.com/docs/thread/3725183/how-can-i-prevent-split-from-converting-number-ranges-into-dates?hl=en) ... | To bulk copy values within a spreadsheet file, use an [{ array expression }](https://support.google.com/docs/answer/6208276), like this:
```
={ Sheet1!A1:Z }
``` |
167,883 | <p>dreadful title, sorry. I have a problem that I cannot solve despite trying for a couple of hours now.</p>
<p>I have a google sheet with a field that has values, like "£240K - £2.4M" - I've found a way to split these over two columns using:</p>
<pre><code>=if(REGEXMATCH(L3,"-"),SPLIT(L3,CONCATENAT... | [
{
"answer_id": 167888,
"author": "Cindy LB",
"author_id": 304507,
"author_profile": "https://webapps.stackexchange.com/users/304507",
"pm_score": 3,
"selected": true,
"text": "<p>Most likely the IT Department has changed controls for users since the time you set your photo. This isn't un... | 2022/11/23 | [
"https://webapps.stackexchange.com/questions/167883",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/304627/"
] | dreadful title, sorry. I have a problem that I cannot solve despite trying for a couple of hours now.
I have a google sheet with a field that has values, like "£240K - £2.4M" - I've found a way to split these over two columns using:
```
=if(REGEXMATCH(L3,"-"),SPLIT(L3,CONCATENATE(SPLIT(L3,".0123456789"))),L3)
```
S... | Most likely the IT Department has changed controls for users since the time you set your photo. This isn't uncommon as organizations are becoming more concerned about any content on their website or related. I realize it is just a profile photo. But it is entirely possible that your IT department has ran into the issue... |
167,895 | <p>I have a Google Sheets table and one of the columns has email addresses.</p>
<p>I'm filtering that column using this custom formula that works:</p>
<pre><code>=FIND("@gmail.com",I2)
</code></pre>
<p>But I need to be able to filter more. For example for others, email domains, like @yahoo.com, @gmail.com, @h... | [
{
"answer_id": 167888,
"author": "Cindy LB",
"author_id": 304507,
"author_profile": "https://webapps.stackexchange.com/users/304507",
"pm_score": 3,
"selected": true,
"text": "<p>Most likely the IT Department has changed controls for users since the time you set your photo. This isn't un... | 2022/11/23 | [
"https://webapps.stackexchange.com/questions/167895",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/304659/"
] | I have a Google Sheets table and one of the columns has email addresses.
I'm filtering that column using this custom formula that works:
```
=FIND("@gmail.com",I2)
```
But I need to be able to filter more. For example for others, email domains, like @yahoo.com, @gmail.com, @hotmail.com, etc. etc.
I'm trying to str... | Most likely the IT Department has changed controls for users since the time you set your photo. This isn't uncommon as organizations are becoming more concerned about any content on their website or related. I realize it is just a profile photo. But it is entirely possible that your IT department has ran into the issue... |
167,971 | <p>In Google Sheets I have a very simple formula to subtract the value in column A from the value in column B and show the total in column C.</p>
<p>Column C formula:</p>
<pre><code>=(B:B-A:A)*24
</code></pre>
<p>I've selected column C by clicking on the header and I'd like to it to apply to every cell in column C (may... | [
{
"answer_id": 167973,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 2,
"selected": false,
"text": "<p>The easy answer is: put your formula inside the <code>arrayformula()</code> function.</p>\n<p>In that way the... | 2022/11/29 | [
"https://webapps.stackexchange.com/questions/167971",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/20235/"
] | In Google Sheets I have a very simple formula to subtract the value in column A from the value in column B and show the total in column C.
Column C formula:
```
=(B:B-A:A)*24
```
I've selected column C by clicking on the header and I'd like to it to apply to every cell in column C (maybe except the empty cells or h... | The easy answer is: put your formula inside the `arrayformula()` function.
In that way the calculation will be performed taking into consideration all the cells of columns `B` and `C`.
However there will be a problem: there will be a whole series of zeros, which we could cancel for example with:
```
=arrayformula(if... |
168,031 | <p>How do I use conditional formatting highlight cells in a range where the value in the cell matches the value in a specific column in the same row in Google Sheets.</p>
<p>For example:</p>
<p><a href="https://i.stack.imgur.com/uDv5W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uDv5W.png" alt="en... | [
{
"answer_id": 168034,
"author": "VX3",
"author_id": 305126,
"author_profile": "https://webapps.stackexchange.com/users/305126",
"pm_score": 0,
"selected": false,
"text": "<p>To use conditional formatting to highlight cells in a range where the value in the cell matches the value in a sp... | 2022/12/02 | [
"https://webapps.stackexchange.com/questions/168031",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/140429/"
] | How do I use conditional formatting highlight cells in a range where the value in the cell matches the value in a specific column in the same row in Google Sheets.
For example:
[](https://i.stack.imgur.com/uDv5W.png) | [](https://i.stack.imgur.com/FH7Jh.png)
This is the correct custom formula to apply to the range `B2:F`:
```
=and($a2=b2,$a2<>"")
```
[](https://i.stack.imgur.com/aRYqE.png) |
168,044 | <p>How can I take the <a href="https://en.wikipedia.org/wiki/Convolution" rel="nofollow noreferrer">convolution</a> of two distributions on a spreadsheet such as Google Sheets?</p>
<p>Example 1: You want to multiply two arbitrary polynomials together on a spreadsheet symbolically (e.g. <code>2*x^4 + x</code> times <cod... | [
{
"answer_id": 168045,
"author": "ninjagecko",
"author_id": 111710,
"author_profile": "https://webapps.stackexchange.com/users/111710",
"pm_score": 2,
"selected": false,
"text": "<p>This may be done as follows by using lambdas or <a href=\"https://support.google.com/docs/answer/12504534\... | 2022/12/03 | [
"https://webapps.stackexchange.com/questions/168044",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/111710/"
] | How can I take the [convolution](https://en.wikipedia.org/wiki/Convolution) of two distributions on a spreadsheet such as Google Sheets?
Example 1: You want to multiply two arbitrary polynomials together on a spreadsheet symbolically (e.g. `2*x^4 + x` times `3*x^2 - 5`).
Example 2: Like in a board game or tabletop ga... | This may be done as follows by using lambdas or [Named Functions](https://support.google.com/docs/answer/12504534).
It is as simple as doing something like this:
```
=CONV(dice1, dice2)
```
This works as follows. The below code may be copy-pasted into a single cell, or the inner code (between 'begin function body' ... |
168,053 | <p>My subscription page layout preferences are not saving. I prefer to have my subscription page layout as list instead of grid. Now I have to manually click the list option each time I visit the subscriptions page.</p>
<p>This issue began to occur about a month ago after I had wiped and reinstalled macOS. Prior to wip... | [
{
"answer_id": 168045,
"author": "ninjagecko",
"author_id": 111710,
"author_profile": "https://webapps.stackexchange.com/users/111710",
"pm_score": 2,
"selected": false,
"text": "<p>This may be done as follows by using lambdas or <a href=\"https://support.google.com/docs/answer/12504534\... | 2022/12/04 | [
"https://webapps.stackexchange.com/questions/168053",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/167500/"
] | My subscription page layout preferences are not saving. I prefer to have my subscription page layout as list instead of grid. Now I have to manually click the list option each time I visit the subscriptions page.
This issue began to occur about a month ago after I had wiped and reinstalled macOS. Prior to wiping, I ne... | This may be done as follows by using lambdas or [Named Functions](https://support.google.com/docs/answer/12504534).
It is as simple as doing something like this:
```
=CONV(dice1, dice2)
```
This works as follows. The below code may be copy-pasted into a single cell, or the inner code (between 'begin function body' ... |
168,149 | <p>I am currently attempting to union multiple ranges, but each range has to have a condition met first.</p>
<p>My first attempt at this was the following formula:</p>
<pre><code>={ IF(condition_one, range_one, IFERROR(0/0)); IF(condition_two, range_two, IFERROR(0/0)); IF(condition_three, range_three, IFERROR(0/0)) }
<... | [
{
"answer_id": 168150,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>One option is if the each condition applies for the whole "subrange" you could do something like thi... | 2022/12/09 | [
"https://webapps.stackexchange.com/questions/168149",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/62167/"
] | I am currently attempting to union multiple ranges, but each range has to have a condition met first.
My first attempt at this was the following formula:
```
={ IF(condition_one, range_one, IFERROR(0/0)); IF(condition_two, range_two, IFERROR(0/0)); IF(condition_three, range_three, IFERROR(0/0)) }
```
This works onl... | Use this pattern:
```
=arrayformula(
query(
{
if(C3, TABLE_ROWS_BY_RARITY(B3), iferror(TABLE_ROWS_BY_RARITY(B3) / 0));
if(C4, TABLE_ROWS_BY_RARITY(B4), iferror(TABLE_ROWS_BY_RARITY(B4) / 0));
if(C5, TABLE_ROWS_BY_RARITY(B5), iferror(TABLE_ROWS_BY_RARITY(B5) / 0))
},
"where Col1 i... |
168,186 | <p>I have am using a formula that extracts part of a text string from a cell in Google Sheets based on this <a href="https://webapps.stackexchange.com/a/168072/">answer to an earlier question</a>.</p>
<p>The formula is <code>=LEFT(A2, FIND(" ", A2)+1)&" "&RIGHT(A2,LEN(A2)-FIND("-",... | [
{
"answer_id": 168150,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>One option is if the each condition applies for the whole "subrange" you could do something like thi... | 2022/12/12 | [
"https://webapps.stackexchange.com/questions/168186",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305218/"
] | I have am using a formula that extracts part of a text string from a cell in Google Sheets based on this [answer to an earlier question](https://webapps.stackexchange.com/a/168072/).
The formula is `=LEFT(A2, FIND(" ", A2)+1)&" "&RIGHT(A2,LEN(A2)-FIND("-",A2)+1)` where `A2` is a reference to my source text.
Example O... | Use this pattern:
```
=arrayformula(
query(
{
if(C3, TABLE_ROWS_BY_RARITY(B3), iferror(TABLE_ROWS_BY_RARITY(B3) / 0));
if(C4, TABLE_ROWS_BY_RARITY(B4), iferror(TABLE_ROWS_BY_RARITY(B4) / 0));
if(C5, TABLE_ROWS_BY_RARITY(B5), iferror(TABLE_ROWS_BY_RARITY(B5) / 0))
},
"where Col1 i... |
168,207 | <p>So I would like to be able remove the sidebar tools from draw.io and whenever I need them just somehow summon the Format toolbar that floats above the diagram, but can be hidden again. I have seen this done, but I do not know how to do it.</p>
<p><a href="https://i.stack.imgur.com/tbhUr.png" rel="nofollow noreferrer... | [
{
"answer_id": 168150,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>One option is if the each condition applies for the whole "subrange" you could do something like thi... | 2022/12/13 | [
"https://webapps.stackexchange.com/questions/168207",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/202249/"
] | So I would like to be able remove the sidebar tools from draw.io and whenever I need them just somehow summon the Format toolbar that floats above the diagram, but can be hidden again. I have seen this done, but I do not know how to do it.
[](https://... | Use this pattern:
```
=arrayformula(
query(
{
if(C3, TABLE_ROWS_BY_RARITY(B3), iferror(TABLE_ROWS_BY_RARITY(B3) / 0));
if(C4, TABLE_ROWS_BY_RARITY(B4), iferror(TABLE_ROWS_BY_RARITY(B4) / 0));
if(C5, TABLE_ROWS_BY_RARITY(B5), iferror(TABLE_ROWS_BY_RARITY(B5) / 0))
},
"where Col1 i... |
168,237 | <p>I've gotten my formula correct for the most part but there is this last part that I can't seem to solve. I am hoping someone here can create a better formula than I. Thank you in advance.</p>
<p>Here is the formula I have so far:
=IFS($C$5="4-year",MIN(C32,MAX(3000),AND(C38="Y", MIN(C21,SUM(C9-C2... | [
{
"answer_id": 168150,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>One option is if the each condition applies for the whole "subrange" you could do something like thi... | 2022/12/14 | [
"https://webapps.stackexchange.com/questions/168237",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305689/"
] | I've gotten my formula correct for the most part but there is this last part that I can't seem to solve. I am hoping someone here can create a better formula than I. Thank you in advance.
Here is the formula I have so far:
=IFS($C$5="4-year",MIN(C32,MAX(3000),AND(C38="Y", MIN(C21,SUM(C9-C22)-C39),AND(C37 = "N" , C22>=... | Use this pattern:
```
=arrayformula(
query(
{
if(C3, TABLE_ROWS_BY_RARITY(B3), iferror(TABLE_ROWS_BY_RARITY(B3) / 0));
if(C4, TABLE_ROWS_BY_RARITY(B4), iferror(TABLE_ROWS_BY_RARITY(B4) / 0));
if(C5, TABLE_ROWS_BY_RARITY(B5), iferror(TABLE_ROWS_BY_RARITY(B5) / 0))
},
"where Col1 i... |
168,291 | <p>In Sheet 1 I have a table of orders due for a delivery. Column A is a list of the order numbers, and column H is the delivery date. In Sheet 2, I want to create a list of the order numbers that have a delivery date that is the same as the date in Sheet 2 Cell D1, which already updates itself as required. I have trie... | [
{
"answer_id": 168150,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>One option is if the each condition applies for the whole "subrange" you could do something like thi... | 2022/12/19 | [
"https://webapps.stackexchange.com/questions/168291",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305887/"
] | In Sheet 1 I have a table of orders due for a delivery. Column A is a list of the order numbers, and column H is the delivery date. In Sheet 2, I want to create a list of the order numbers that have a delivery date that is the same as the date in Sheet 2 Cell D1, which already updates itself as required. I have tried a... | Use this pattern:
```
=arrayformula(
query(
{
if(C3, TABLE_ROWS_BY_RARITY(B3), iferror(TABLE_ROWS_BY_RARITY(B3) / 0));
if(C4, TABLE_ROWS_BY_RARITY(B4), iferror(TABLE_ROWS_BY_RARITY(B4) / 0));
if(C5, TABLE_ROWS_BY_RARITY(B5), iferror(TABLE_ROWS_BY_RARITY(B5) / 0))
},
"where Col1 i... |
168,336 | <p>I had a formula that worked in Libreoffice that no longer works after transferring to Sheets, as it used the Aggregate formula. Someone else made it for me and I don't know exactly how to replicate it.</p>
<p>Basically what I need to do is find the largest value in one column, based on criteria in a second column, b... | [
{
"answer_id": 168308,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>I do not think there is a feature in Google Sheets that would let you enter a range reference in a dialog... | 2022/12/21 | [
"https://webapps.stackexchange.com/questions/168336",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306005/"
] | I had a formula that worked in Libreoffice that no longer works after transferring to Sheets, as it used the Aggregate formula. Someone else made it for me and I don't know exactly how to replicate it.
Basically what I need to do is find the largest value in one column, based on criteria in a second column, but return... | Yes, you can select the desired range using only the keyboard - use the keyboard shortcut **Ctrl+J**, enter the desired range and press Enter.

Here is a sequence of steps that simulates drag-by-corner from keyboard:
1. Copy the cell or range of cells to clipb... |
168,370 | <p>I need help in creating a formula (in Google Sheets) which concatenates three cells of data together in a specified order indicated by two dropdown boxes. Below is a picture of my test spreadsheet.</p>
<p><a href="https://i.stack.imgur.com/JbrkH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jbrk... | [
{
"answer_id": 168371,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>Use a conditional statement such as <code>ifs()</code> or <code>switch()</code>, like this:</p>\n<pre><co... | 2022/12/23 | [
"https://webapps.stackexchange.com/questions/168370",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305240/"
] | I need help in creating a formula (in Google Sheets) which concatenates three cells of data together in a specified order indicated by two dropdown boxes. Below is a picture of my test spreadsheet.
[](https://i.stack.imgur.com/JbrkH.png)
I would like... | I think you made a mistake because `case2` and `case4` are equal:
**case2**: IF(B1=`"Post-verb" AND B2="Prefix"` then
**case4**: IF(B1=`"Post-verb" AND B2="Prefix"` then
BTW: try this formula:
```
=Ifs(
B1 & B2="Pre-verb"&"Prefix", B3 & B4 & B5,
B1 & B2="Post-verb"&"Prefix",B4 & B5 & B3,
B1 & B2="Pre-ve... |
168,387 | <p>There are various numbers of comma separated values in a Google Sheets column, how can I retain no more than the first 6 values in each cell & discard the rest?</p>
| [
{
"answer_id": 168391,
"author": "Daniele",
"author_id": 284743,
"author_profile": "https://webapps.stackexchange.com/users/284743",
"pm_score": 1,
"selected": false,
"text": "<p>If the google sheet column is <code>column A</code>, you could try this formula:</p>\n<pre><code>=index(\nifn... | 2022/12/26 | [
"https://webapps.stackexchange.com/questions/168387",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306153/"
] | There are various numbers of comma separated values in a Google Sheets column, how can I retain no more than the first 6 values in each cell & discard the rest? | If the google sheet column is `column A`, you could try this formula:
```
=index(
ifna(
if(
len(A1:A)-len(substitute((A1:A), ",", ""))+1>=6,
regexextract(substitute(A1:A,",","§",6),"(.*)§"),
A1:A
)
)
)
```
where:
```
len(A1:A)-len(substitute((A1:A), ",", ""))+1>=6
```
checks that there are at least 6 commas in th... |
168,425 | <p>I have multiple monthly support contracts with always the same payment per client and per month. Some clients pay every month, others pay every 3, 6 or 12 months. I know the starting month for every contract. And I would like to see what is my income for January, February, etc.</p>
<p>How can I calculate the income ... | [
{
"answer_id": 168434,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>First, replace starting months that are text strings like <code>1 (January)</code> with dates like <code>... | 2022/12/27 | [
"https://webapps.stackexchange.com/questions/168425",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306210/"
] | I have multiple monthly support contracts with always the same payment per client and per month. Some clients pay every month, others pay every 3, 6 or 12 months. I know the starting month for every contract. And I would like to see what is my income for January, February, etc.
How can I calculate the income at the di... | First, replace starting months that are text strings like `1 (January)` with dates like `2023-01-01`:
| Client | Amount | Start date | Pays every X months |
| --- | --- | --- | --- |
| client A | $29 | **2023-01-01** | 3 |
| client B | $39 | **2023-03-01** | 6 |
| client C | $49 | **2023-10-01** | 12 |
You can then g... |
168,539 | <p>I have a sheets file that requires users to inserts links in the cells of a specific column when they add the information required.
However, to make sure this step is done accordingly, I would like to try to force the link to be inserted.
The file is this: <a href="https://docs.google.com/spreadsheets/d/1iYYuvk5aXIp... | [
{
"answer_id": 168552,
"author": "The God of Biscuits",
"author_id": 293686,
"author_profile": "https://webapps.stackexchange.com/users/293686",
"pm_score": 0,
"selected": false,
"text": "<p>If scripting isn't required and you just need to validate that the entered data corresponds to a ... | 2023/01/03 | [
"https://webapps.stackexchange.com/questions/168539",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300608/"
] | I have a sheets file that requires users to inserts links in the cells of a specific column when they add the information required.
However, to make sure this step is done accordingly, I would like to try to force the link to be inserted.
The file is this: <https://docs.google.com/spreadsheets/d/1iYYuvk5aXIpBmQgwLktqO0... | Here is a script that will monitor column `W` and show a dialog box when a value is selected from a drop-down list there.
```
/**
* Simple trigger that runs each time the user manually edits the spreadsheet.
* Monitors a column and inserts a link when a cell there is edited.
*
* @param {Object} e The onEdit() event ob... |
168,566 | <p>My question is best portrayed in the picture below. Thanks in advance!</p>
<p><a href="https://i.stack.imgur.com/XJtIl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XJtIl.png" alt="enter image description here" /></a></p>
| [
{
"answer_id": 168568,
"author": "Oleg_S",
"author_id": 239790,
"author_profile": "https://webapps.stackexchange.com/users/239790",
"pm_score": 3,
"selected": true,
"text": "<p>Please, see the <a href=\"https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/e... | 2023/01/05 | [
"https://webapps.stackexchange.com/questions/168566",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305240/"
] | My question is best portrayed in the picture below. Thanks in advance!
[](https://i.stack.imgur.com/XJtIl.png) | Please, see the [file](https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/edit?usp=sharing)
A4 contains following formula:
```
=ARRAYFORMULA(
TRANSPOSE(
FILTER(
TRANSPOSE(
FILTER($A$1:$F$1&TRANSPOSE($A$1:$F$1),$A$2:$F$2)
),$A$2:$F$2)
)
)
```
The idea is to FIL... |
168,582 | <p>I have a sheet with mixed colors and associated numbers (I cannot order this one):
<a href="https://i.stack.imgur.com/gdE8y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gdE8y.png" alt="sheet 1" /></a></p>
<p>and a list of colors in another sheet:</p>
<p><a href="https://i.stack.imgur.com/dvcpN.... | [
{
"answer_id": 168568,
"author": "Oleg_S",
"author_id": 239790,
"author_profile": "https://webapps.stackexchange.com/users/239790",
"pm_score": 3,
"selected": true,
"text": "<p>Please, see the <a href=\"https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/e... | 2023/01/05 | [
"https://webapps.stackexchange.com/questions/168582",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306601/"
] | I have a sheet with mixed colors and associated numbers (I cannot order this one):
[](https://i.stack.imgur.com/gdE8y.png)
and a list of colors in another sheet:
[](https://i.stack.imgur.com/dvcpN.png)
What I want to do is ... | Please, see the [file](https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/edit?usp=sharing)
A4 contains following formula:
```
=ARRAYFORMULA(
TRANSPOSE(
FILTER(
TRANSPOSE(
FILTER($A$1:$F$1&TRANSPOSE($A$1:$F$1),$A$2:$F$2)
),$A$2:$F$2)
)
)
```
The idea is to FIL... |
168,621 | <p>I've been on a hunt to find a script that will return file names and hyperlinks into a Google Sheet. I found the following script that works perfectly, but is limited to PDFs. How do I modify this so it returns all files within a given folder?</p>
<pre><code>function ListFldPdfs() {
// replace FOLDER-ID with you... | [
{
"answer_id": 168568,
"author": "Oleg_S",
"author_id": 239790,
"author_profile": "https://webapps.stackexchange.com/users/239790",
"pm_score": 3,
"selected": true,
"text": "<p>Please, see the <a href=\"https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/e... | 2023/01/07 | [
"https://webapps.stackexchange.com/questions/168621",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306694/"
] | I've been on a hunt to find a script that will return file names and hyperlinks into a Google Sheet. I found the following script that works perfectly, but is limited to PDFs. How do I modify this so it returns all files within a given folder?
```
function ListFldPdfs() {
// replace FOLDER-ID with your folder's ID
... | Please, see the [file](https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/edit?usp=sharing)
A4 contains following formula:
```
=ARRAYFORMULA(
TRANSPOSE(
FILTER(
TRANSPOSE(
FILTER($A$1:$F$1&TRANSPOSE($A$1:$F$1),$A$2:$F$2)
),$A$2:$F$2)
)
)
```
The idea is to FIL... |
168,646 | <p>I have been trying to build a checkout system for devices at work using spreadsheets and google forms. The google forms work wonderfully, and I'm able to get all the data I need in a spreadsheet that I can look through manually if a device turns up missing. I was hoping the process of taking this data and creating a... | [
{
"answer_id": 168568,
"author": "Oleg_S",
"author_id": 239790,
"author_profile": "https://webapps.stackexchange.com/users/239790",
"pm_score": 3,
"selected": true,
"text": "<p>Please, see the <a href=\"https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/e... | 2023/01/09 | [
"https://webapps.stackexchange.com/questions/168646",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306734/"
] | I have been trying to build a checkout system for devices at work using spreadsheets and google forms. The google forms work wonderfully, and I'm able to get all the data I need in a spreadsheet that I can look through manually if a device turns up missing. I was hoping the process of taking this data and creating a sh... | Please, see the [file](https://docs.google.com/spreadsheets/d/1oXGcM4GaZ5MSon9bdqATks7RZDCdt_uqznY5S7Kdqp4/edit?usp=sharing)
A4 contains following formula:
```
=ARRAYFORMULA(
TRANSPOSE(
FILTER(
TRANSPOSE(
FILTER($A$1:$F$1&TRANSPOSE($A$1:$F$1),$A$2:$F$2)
),$A$2:$F$2)
)
)
```
The idea is to FIL... |
168,647 | <p>I can now find the maximum number of consecutive negative occurrences of B:B.</p>
<p>However, my problem is that I want to find the maximum number of consecutive occurrences of negative B:B that match the C3 date by specifying the C3 date and finding B:B and A:A.</p>
<p><a href="https://i.stack.imgur.com/JY86Z.png" ... | [
{
"answer_id": 168649,
"author": "David Tan",
"author_id": 293022,
"author_profile": "https://webapps.stackexchange.com/users/293022",
"pm_score": -1,
"selected": false,
"text": "<p>We will want to first sort the data, then do the operation. This is simple enough. Just change <code>B1:B2... | 2023/01/09 | [
"https://webapps.stackexchange.com/questions/168647",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306736/"
] | I can now find the maximum number of consecutive negative occurrences of B:B.
However, my problem is that I want to find the maximum number of consecutive occurrences of negative B:B that match the C3 date by specifying the C3 date and finding B:B and A:A.
[ expression inside the `left()`, like this:
```
=arrayformula(
if(
countif(A1:A, C3),
max(
len(
split(
join(
"",
left( not( (A1:A <> C3) + (B1:B >= 0) ) )... |
168,759 | <p>I'm trying to make the current column (most recent interaction date with client) display the max values (most recent dates) from ContactLog!b:b (dates of all recorded interactions), when the client name in ContactLog!A:A matches to the client name in current row column A.</p>
<p>After many days of trying, I've found... | [
{
"answer_id": 168761,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": true,
"text": "<p>You can do something like this with BYROW, that allows you to expand your formula through the column and be cal... | 2023/01/15 | [
"https://webapps.stackexchange.com/questions/168759",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/307017/"
] | I'm trying to make the current column (most recent interaction date with client) display the max values (most recent dates) from ContactLog!b:b (dates of all recorded interactions), when the client name in ContactLog!A:A matches to the client name in current row column A.
After many days of trying, I've found several ... | You can do something like this with BYROW, that allows you to expand your formula through the column and be calculated "row by row". Using your first option:
```
=BYROW(A:A, LAMBDA (each,IF(each="","",MAXIFS(ContactLog!B:B, ContactLog!A:A, each))))
``` |
168,805 | <p>I'm trying to create a formula that will reduce and increase a cell value by percentages found in other cells and finding it difficult so hoping someone can help with what i'm trying to do.</p>
<p>I've attached a sample sheet below with comments with what i am trying to achieve, probably super easy but my brain is f... | [
{
"answer_id": 168806,
"author": "Blind Spots",
"author_id": 197518,
"author_profile": "https://webapps.stackexchange.com/users/197518",
"pm_score": 0,
"selected": false,
"text": "<p><a href=\"https://docs.google.com/spreadsheets/d/1b-nhNYoamsMr2vFW1YZQvLXLuSksH83iW1weHtDDe3Q/edit#gid=58... | 2023/01/17 | [
"https://webapps.stackexchange.com/questions/168805",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306969/"
] | I'm trying to create a formula that will reduce and increase a cell value by percentages found in other cells and finding it difficult so hoping someone can help with what i'm trying to do.
I've attached a sample sheet below with comments with what i am trying to achieve, probably super easy but my brain is fried!
if... | You can try this formula for the 5 weeks in just the first cell:
```
=MAP(B7:B11,BYROW(E7:H11,LAMBDA(e,SUMPRODUCT(e,TRANSPOSE(G31:G34)))),LAMBDA(bonus,perc,bonus*(IF(perc>0,1,SI(perc<-1,0,1+perc)))))
```
Added in sheet Solution 1 |
168,847 | <pre><code>=sort(
filter(
{ Bryson!A4:S502; David!A4:S502; Justin!A4:S502; Michael!A4:S502; Manny!A4:S502; ScottC!A4:S502; ScottD!A4:S502; Zhenqian!A4:S502; Visitors!A4:S502 },
regexmatch({ Bryson!Q4:Q502; David!Q4:Q502; Justin!Q4:Q502; Michael!Q4:Q502; Manny!Q4:Q502; ScottC!Q4:Q502; ScottD!Q4:Q502; Zhenqia... | [
{
"answer_id": 168848,
"author": "Bryson Williams",
"author_id": 305796,
"author_profile": "https://webapps.stackexchange.com/users/305796",
"pm_score": 0,
"selected": false,
"text": "<pre><code>=sort( \n filter( \n { Bryson!A4:S502; David!A4:S502; Justin!A4:S502; Michael!A4:S502; Ma... | 2023/01/19 | [
"https://webapps.stackexchange.com/questions/168847",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305796/"
] | ```
=sort(
filter(
{ Bryson!A4:S502; David!A4:S502; Justin!A4:S502; Michael!A4:S502; Manny!A4:S502; ScottC!A4:S502; ScottD!A4:S502; Zhenqian!A4:S502; Visitors!A4:S502 },
regexmatch({ Bryson!Q4:Q502; David!Q4:Q502; Justin!Q4:Q502; Michael!Q4:Q502; Manny!Q4:Q502; ScottC!Q4:Q502; ScottD!Q4:Q502; Zhenqian!Q4:Q5... | If you're just comparing with values, you can just use the comparison symbols without REGEXMATCH:
```
=sort(
filter(
{ Bryson!A4:S502; David!A4:S502; Justin!A4:S502; Michael!A4:S502; Manny!A4:S502; ScottC!A4:S502; ScottD!A4:S502; Zhenqian!A4:S502; Visitors!A4:S502 },
{ Bryson!Q4:Q502; David!Q4:Q502; Justin... |
168,850 | <pre><code>=QUERY({
importrange("1HGW2VJFyhosCM-5AK7II6CRt19sPMsmGPbxEJvPVnK0","SUN!A3:AB5001");
importrange("1Fjbl3Ndh-thsb9ufNhJ2GgHjjIfvG1e7vUe4dNcwCew","SEA!A3:AB5001");
importrange("14oCp6aM-2Yo5uaRhXHxWJQ2RY1TLPn-G0HUmfXAwE3g","BUR!A3:AB5001&qu... | [
{
"answer_id": 168848,
"author": "Bryson Williams",
"author_id": 305796,
"author_profile": "https://webapps.stackexchange.com/users/305796",
"pm_score": 0,
"selected": false,
"text": "<pre><code>=sort( \n filter( \n { Bryson!A4:S502; David!A4:S502; Justin!A4:S502; Michael!A4:S502; Ma... | 2023/01/20 | [
"https://webapps.stackexchange.com/questions/168850",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/305796/"
] | ```
=QUERY({
importrange("1HGW2VJFyhosCM-5AK7II6CRt19sPMsmGPbxEJvPVnK0","SUN!A3:AB5001");
importrange("1Fjbl3Ndh-thsb9ufNhJ2GgHjjIfvG1e7vUe4dNcwCew","SEA!A3:AB5001");
importrange("14oCp6aM-2Yo5uaRhXHxWJQ2RY1TLPn-G0HUmfXAwE3g","BUR!A3:AB5001")
}, "select * where Col26 contains 'Yes'",0)
```
I am at a lo... | If you're just comparing with values, you can just use the comparison symbols without REGEXMATCH:
```
=sort(
filter(
{ Bryson!A4:S502; David!A4:S502; Justin!A4:S502; Michael!A4:S502; Manny!A4:S502; ScottC!A4:S502; ScottD!A4:S502; Zhenqian!A4:S502; Visitors!A4:S502 },
{ Bryson!Q4:Q502; David!Q4:Q502; Justin... |
168,858 | <p>Is it possible to use an operation on a range inside COUNTIF? Let's say I want to count all the occurrences where a range is less than 50 <em>after rounding</em>. Can I do that without creating an extra column?</p>
<p>This does not work (returns 0).</p>
<pre><code>=COUNTIF(ROUND(scores); "<50")
</code><... | [
{
"answer_id": 168859,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 2,
"selected": true,
"text": "<p>Use an <code>arrayformula()</code> wrapper to evaluate <code>round()</code> for every value, like this:</p... | 2023/01/20 | [
"https://webapps.stackexchange.com/questions/168858",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/29285/"
] | Is it possible to use an operation on a range inside COUNTIF? Let's say I want to count all the occurrences where a range is less than 50 *after rounding*. Can I do that without creating an extra column?
This does not work (returns 0).
```
=COUNTIF(ROUND(scores); "<50")
``` | Use an `arrayformula()` wrapper to evaluate `round()` for every value, like this:
```
=arrayformula( countif( round(scores); "< 50" ) )
```
The formula assumes that every value in `scores` contains a number. In the event the range may also contain blanks or text strings, use `filter()`, like this:
```
=counta( ifer... |
168,896 | <p>I want to sum data from one column based on criteria met from two other columns. I tried the following, but I'm getting an error: "Wrong number of arguments to SUMIF. Expected between 2 and 3 arguments, but got 5 arguments."</p>
<p>This is the formula I used:</p>
<pre><code>=SUMIF(C2:C1013,"January&qu... | [
{
"answer_id": 168871,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<blockquote>\n<p>The error message "In ARRAY_LITERAL, an Array Literal was missing values for one or mo... | 2023/01/23 | [
"https://webapps.stackexchange.com/questions/168896",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/307396/"
] | I want to sum data from one column based on criteria met from two other columns. I tried the following, but I'm getting an error: "Wrong number of arguments to SUMIF. Expected between 2 and 3 arguments, but got 5 arguments."
This is the formula I used:
```
=SUMIF(C2:C1013,"January",B2:B1000,"Earned_-_Summer_Intensive... | >
> The error message "In ARRAY\_LITERAL, an Array Literal was missing values for one or more rows."
>
>
>
The error message suggests that this is an `importrange()` [authorization](https://support.google.com/docs/answer/3093340?visit_id=638098003054890574-1032217142&rd=1#zippy=%2Cpermission-access) issue. In orde... |
168,949 | <p>I'm currently using the below code to create a custom menu called 'Team Admin' in Google sheets which allows a user to activate the function 'newSheet' when the menu item 'Add Agents' is clicked.</p>
<pre><code>function onOpen() {
var menu = [{
name : "Add Agents",
functionName ... | [
{
"answer_id": 168955,
"author": "James 'Mook' Pite",
"author_id": 306969,
"author_profile": "https://webapps.stackexchange.com/users/306969",
"pm_score": 2,
"selected": false,
"text": "<p>managed to sort it by editing as per below:</p>\n<pre><code>function onOpen() {\n var ui = Spreads... | 2023/01/26 | [
"https://webapps.stackexchange.com/questions/168949",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/306969/"
] | I'm currently using the below code to create a custom menu called 'Team Admin' in Google sheets which allows a user to activate the function 'newSheet' when the menu item 'Add Agents' is clicked.
```
function onOpen() {
var menu = [{
name : "Add Agents",
functionName : "newSheet"
}
... | One way is to list menu items and their function names like this:
```
function onOpen() {
SpreadsheetApp.getActive()
.addMenu(
'⚙️Team Admin',
[
{
name: 'Add Agents',
functionName: 'newSheet',
},
{
name: 'Reset Agents',
functionName: 'de... |
168,986 | <p><a href="https://i.stack.imgur.com/oPIk5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oPIk5.png" alt="Example" /></a></p>
<p>Hi,
is there a way to ignore the duplicated values in columns A and B (highlighted) and extract ones that don't repeat (column C extracted manually for example)?</p>
| [
{
"answer_id": 168955,
"author": "James 'Mook' Pite",
"author_id": 306969,
"author_profile": "https://webapps.stackexchange.com/users/306969",
"pm_score": 2,
"selected": false,
"text": "<p>managed to sort it by editing as per below:</p>\n<pre><code>function onOpen() {\n var ui = Spreads... | 2023/01/28 | [
"https://webapps.stackexchange.com/questions/168986",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/307645/"
] | [](https://i.stack.imgur.com/oPIk5.png)
Hi,
is there a way to ignore the duplicated values in columns A and B (highlighted) and extract ones that don't repeat (column C extracted manually for example)? | One way is to list menu items and their function names like this:
```
function onOpen() {
SpreadsheetApp.getActive()
.addMenu(
'⚙️Team Admin',
[
{
name: 'Add Agents',
functionName: 'newSheet',
},
{
name: 'Reset Agents',
functionName: 'de... |
169,021 | <p>I have this table</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Name (Col A)</th>
<th>Start Date (Col B)</th>
<th>End Date (Col C)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Name_1</td>
<td>1/31/2023</td>
<td>2/2/2023</td>
</tr>
<tr>
<td>Name_2</td>
<td>1/16/2023</td>
<td>1/17/2023</td>
</tr... | [
{
"answer_id": 169027,
"author": "The God of Biscuits",
"author_id": 293686,
"author_profile": "https://webapps.stackexchange.com/users/293686",
"pm_score": -1,
"selected": false,
"text": "<p>In Google Sheets you can try:</p>\n<pre><code>=arrayformula(split(flatten(A2:A3&"|"... | 2023/01/31 | [
"https://webapps.stackexchange.com/questions/169021",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/300553/"
] | I have this table
| Name (Col A) | Start Date (Col B) | End Date (Col C) |
| --- | --- | --- |
| Name\_1 | 1/31/2023 | 2/2/2023 |
| Name\_2 | 1/16/2023 | 1/17/2023 |
and I am trying to change it to a long format, like this:
| Name | Date |
| --- | --- |
| Name\_1 | 1/31/2023 |
| Name\_1 | 2/1/2023 |
| Name\_1 | 2/2/... | #### Formula
This formula avoids joining and splitting to allow for much larger arrays. You can see additional detail on the impact in large arrays of joining and splitting in [this answer](https://webapps.stackexchange.com/a/168065/)
```
=LAMBDA(x, FILTER(x, INDEX(x,,1)<>""))
({ FLATTEN(MAP(name, start, end,
... |
169,058 | <p>I'm working on a spreadsheet with a different sheet for each month, and while I'm duplicating the sample data realized it would be easier to just select a column and change the month without changing the day or year.</p>
<p>Is something like that possible?</p>
<p>For example, something like this:</p>
<div class="s-t... | [
{
"answer_id": 169060,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>Use the <strong>Edit > Find and replace</strong> dialog box to search for a <a href=\"http://www.regul... | 2023/02/02 | [
"https://webapps.stackexchange.com/questions/169058",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/307865/"
] | I'm working on a spreadsheet with a different sheet for each month, and while I'm duplicating the sample data realized it would be easier to just select a column and change the month without changing the day or year.
Is something like that possible?
For example, something like this:
| Old Date | Change Date to |
| -... | Use the **Edit > Find and replace** dialog box to search for a [regular expression](http://www.regular-expressions.info/quickstart.html) like `^1/` and replace those substrings with `4/`.
To do this with a formula, use `edate()`, like this:
```
=map(
A2:A,
lambda(
date,
if( isdate_strict(date), edate(... |
169,078 | <p>In Excel, I can create a table (n.b., not a Pivot Table) through <code>Insert > Table</code> with headers where I can sort and filter the table among other functions.</p>
<p><a href="https://i.stack.imgur.com/KgNEE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KgNEE.png" alt="enter image desc... | [
{
"answer_id": 169060,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>Use the <strong>Edit > Find and replace</strong> dialog box to search for a <a href=\"http://www.regul... | 2023/02/02 | [
"https://webapps.stackexchange.com/questions/169078",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/235586/"
] | In Excel, I can create a table (n.b., not a Pivot Table) through `Insert > Table` with headers where I can sort and filter the table among other functions.
[](https://i.stack.imgur.com/KgNEE.png)
Is there a similar functionality in Google Sheets? I c... | Use the **Edit > Find and replace** dialog box to search for a [regular expression](http://www.regular-expressions.info/quickstart.html) like `^1/` and replace those substrings with `4/`.
To do this with a formula, use `edate()`, like this:
```
=map(
A2:A,
lambda(
date,
if( isdate_strict(date), edate(... |
169,090 | <p>I have a range of data where each row is in alphabetical order and I want to pull each cell in the row that contains "client" to another column. <a href="https://i.stack.imgur.com/7PLrz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7PLrz.png" alt="enter image description here" /></a></... | [
{
"answer_id": 169060,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>Use the <strong>Edit > Find and replace</strong> dialog box to search for a <a href=\"http://www.regul... | 2023/02/03 | [
"https://webapps.stackexchange.com/questions/169090",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/307913/"
] | I have a range of data where each row is in alphabetical order and I want to pull each cell in the row that contains "client" to another column. [](https://i.stack.imgur.com/7PLrz.png) | Use the **Edit > Find and replace** dialog box to search for a [regular expression](http://www.regular-expressions.info/quickstart.html) like `^1/` and replace those substrings with `4/`.
To do this with a formula, use `edate()`, like this:
```
=map(
A2:A,
lambda(
date,
if( isdate_strict(date), edate(... |
169,136 | <p>Say there's a cell <strong>A1</strong> in which the text content is "<strong>丟內樓某</strong>". How could I split the text into an array such as ["丟", "內", "樓", "某"]?</p>
<p>Since this is a string of Chinese characters and there's no blank within it as a delimiter, I do... | [
{
"answer_id": 169138,
"author": "Glorfindel",
"author_id": 136642,
"author_profile": "https://webapps.stackexchange.com/users/136642",
"pm_score": 2,
"selected": false,
"text": "<p>I found a solution by Joshua Tzucker <a href=\"https://joshuatz.com/posts/2021/google-sheets-split-string-... | 2023/02/07 | [
"https://webapps.stackexchange.com/questions/169136",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/292330/"
] | Say there's a cell **A1** in which the text content is "**丟內樓某**". How could I split the text into an array such as ["丟", "內", "樓", "某"]?
Since this is a string of Chinese characters and there's no blank within it as a delimiter, I don't think I can use the [SPLIT](https://support.google.com/docs/answer/3094136?hl=en)... | Another solution:
```
=regexextract(A1,regexreplace(A1,"(.)","($1)"))
```
Or:
```
=split(regexreplace(A1,"(.)","$1ζ"),"ζ")
```
Or:
```
=arrayformula(mid(A1,sequence(1,len(A1)),1))
``` |
169,202 | <p>I'm having some trouble finding a formula to put(replace) my duplicates values into "0". I tried everything I know (not a lot) and nothing works. I have two columns: Column A and Column B. Column A is a list of References numbers and Column B is the "amount to pay". Some rows in duplicate in colu... | [
{
"answer_id": 169204,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>You can try this. With MAP it counts if there is more than 1 value equal in those columns up to each row. If t... | 2023/02/10 | [
"https://webapps.stackexchange.com/questions/169202",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/308215/"
] | I'm having some trouble finding a formula to put(replace) my duplicates values into "0". I tried everything I know (not a lot) and nothing works. I have two columns: Column A and Column B. Column A is a list of References numbers and Column B is the "amount to pay". Some rows in duplicate in column A have the same valu... | Put this formula in cell `C2`:
```
=if( countifs(A$2:A2, A2, B$2:B2, B2) > 1, 0, B2 )
```
The formula needs to be copied down the column.
You can also do the same with a lambda that fills the whole column in one go, like this:
```
=let(
keys, A2:A, values, B2:B,
firstKey, offset(keys, 0, 0, 1, 1),
firstVa... |
169,297 | <p>I have a PE teacher that wants to make her grading simple.</p>
<p>She has a 5 point system: 5 points for Attending on Time, Being Properly Dressed, and Participating. She wants to be able to put a letter in the cell for the apporiate score such as H=5 or (Absent) A=0, or (Tardy) T=4. Once a student has all their var... | [
{
"answer_id": 169299,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>One way to do that would be to use <a href=\"https://support.google.com/docs/answer/63175\" rel=\"nofollo... | 2023/02/15 | [
"https://webapps.stackexchange.com/questions/169297",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/308411/"
] | I have a PE teacher that wants to make her grading simple.
She has a 5 point system: 5 points for Attending on Time, Being Properly Dressed, and Participating. She wants to be able to put a letter in the cell for the apporiate score such as H=5 or (Absent) A=0, or (Tardy) T=4. Once a student has all their variables ty... | Other thing you can do is to create a table with the values and their corresponding numbers. Then you can look up the values of the qualifications in each row, and SUM them.
In my example A1:B6 is my table of reference. And in A8 I have this formula for summing that row:
```
=SUM(INDEX(XLOOKUP(B8:8,$A$1:$A$6,$B$1:$B$... |
169,346 | <p>In Google Sheets:
First, I'd like to return the values in the whole column of D into Column H if:</p>
<ol>
<li>E and F equal A and B</li>
<li>C is <em>not</em> blank</li>
</ol>
<p>This was the formula I tried:
=IF(ISBLANK(C2=TRUE),"",(ARRAYFORMULA(VLOOKUP(E2:E&F2:F,{A2:A&B2:B,C2:D},4,FALSE))))</p>
... | [
{
"answer_id": 169299,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>One way to do that would be to use <a href=\"https://support.google.com/docs/answer/63175\" rel=\"nofollo... | 2023/02/18 | [
"https://webapps.stackexchange.com/questions/169346",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/301223/"
] | In Google Sheets:
First, I'd like to return the values in the whole column of D into Column H if:
1. E and F equal A and B
2. C is *not* blank
This was the formula I tried:
=IF(ISBLANK(C2=TRUE),"",(ARRAYFORMULA(VLOOKUP(E2:E&F2:F,{A2:A&B2:B,C2:D},4,FALSE))))
Second, I'd like to return the values in the whole column o... | Other thing you can do is to create a table with the values and their corresponding numbers. Then you can look up the values of the qualifications in each row, and SUM them.
In my example A1:B6 is my table of reference. And in A8 I have this formula for summing that row:
```
=SUM(INDEX(XLOOKUP(B8:8,$A$1:$A$6,$B$1:$B$... |
169,354 | <p>this is my first time on here, I'm hoping someone can help me :)</p>
<p>I have a formula that finds the final occurrence of a value in a range and gives me the date for that occurrence</p>
<p>=ArrayFormula(LOOKUP(2,1/('Active Inventory'!$F$2:$F$400=$G3),'Active Inventory'!$A$2:$A$400))</p>
<p>It works great, the pro... | [
{
"answer_id": 169355,
"author": "Martín",
"author_id": 303191,
"author_profile": "https://webapps.stackexchange.com/users/303191",
"pm_score": 1,
"selected": false,
"text": "<p>You may try with XMATCH from bottom to top search:</p>\n<pre><code>=INDEX('Active Inventory'!$A$2:$A$400,XMATC... | 2023/02/19 | [
"https://webapps.stackexchange.com/questions/169354",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/308540/"
] | this is my first time on here, I'm hoping someone can help me :)
I have a formula that finds the final occurrence of a value in a range and gives me the date for that occurrence
=ArrayFormula(LOOKUP(2,1/('Active Inventory'!$F$2:$F$400=$G3),'Active Inventory'!$A$2:$A$400))
It works great, the problem is I need to ret... | Use `filter()` to get the shift of the last occurrence of a container name, then another `filter()` to get shifts that come after that shift, and finally `single()` to get the first one, like this:
```
=iferror(
single(
filter(
'Active Inventory'!A$2:A,
'Active Inventory'!A$2:A
>
fi... |
169,378 | <p>I am using a Google spreadsheet as a 2x2 sparse matrix of permissions.</p>
<p>I have a header row "product name" and a header column "Employee name" (not necessarily in first position)</p>
<p>In the cells "product name"x"Employee name", I add the role granted to the user for ... | [
{
"answer_id": 169380,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 1,
"selected": false,
"text": "<p>Create two <a href=\"https://support.google.com/docs/answer/186103\" rel=\"nofollow noreferrer\">drop-dow... | 2023/02/20 | [
"https://webapps.stackexchange.com/questions/169378",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/121358/"
] | I am using a Google spreadsheet as a 2x2 sparse matrix of permissions.
I have a header row "product name" and a header column "Employee name" (not necessarily in first position)
In the cells "product name"x"Employee name", I add the role granted to the user for the tool
This matrix is getting huge and it's hard to f... | Create two [drop-down lists](https://support.google.com/docs/answer/186103), one for the user range and another for the product range, and use `address()` and `match()` to get the A1 location of the cell at the intersection.
Assuming that your data table is in `A4:Z` and the two drop-down lists are in `A2` and `B2`, t... |
169,417 | <p>I am trying to figure out why my script is not working: I have a sheet called "active unentered invoices" where my master data is housed, I am using a true/ false statement is used in column V and manual data is in column P of the same sheet. I would like the data validation list in column P to restore its... | [
{
"answer_id": 169457,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>Chances are that the data contains a mix of text strings like <code>"TRUE"</code> or <code>&quo... | 2023/02/21 | [
"https://webapps.stackexchange.com/questions/169417",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/308657/"
] | I am trying to figure out why my script is not working: I have a sheet called "active unentered invoices" where my master data is housed, I am using a true/ false statement is used in column V and manual data is in column P of the same sheet. I would like the data validation list in column P to restore itself to blank ... | Chances are that the data contains a mix of text strings like `"TRUE"` or `"true"` and the Boolean value `true`.
Spreadsheet formulas will consider those text strings equal to the Boolean `true` in many contexts, but JavaScript will consider them different.
Letter case and spacing also matters. `"TRUE" !== "true"` an... |
169,461 | <p>I've tried the usual markdown syntax, for example:</p>
<pre><code>```py
# Here's my Python code
import this
```
</code></pre>
<p>But it doesn't seem to work, it just displays it literally as if it was plain text. I wasn't able to find information as to whether markdown was the right syntax, or if there's another one... | [
{
"answer_id": 169457,
"author": "doubleunary",
"author_id": 269219,
"author_profile": "https://webapps.stackexchange.com/users/269219",
"pm_score": 0,
"selected": false,
"text": "<p>Chances are that the data contains a mix of text strings like <code>"TRUE"</code> or <code>&quo... | 2023/02/23 | [
"https://webapps.stackexchange.com/questions/169461",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/263389/"
] | I've tried the usual markdown syntax, for example:
```
```py
# Here's my Python code
import this
```
```
But it doesn't seem to work, it just displays it literally as if it was plain text. I wasn't able to find information as to whether markdown was the right syntax, or if there's another one, or if there simply isn... | Chances are that the data contains a mix of text strings like `"TRUE"` or `"true"` and the Boolean value `true`.
Spreadsheet formulas will consider those text strings equal to the Boolean `true` in many contexts, but JavaScript will consider them different.
Letter case and spacing also matters. `"TRUE" !== "true"` an... |