text
stringlengths 83
79.5k
|
---|
H: Exporting date fields from Cognito Forms to Excel on Mac transforms date by 4 years
Why, when I export the entries to Excel, does it change date by 4 years and 1 day and how do I avoid it?
For example, 18/11/2017 on the screen becomes 19/11/2021 in the Excel version. Please note we work with a date format of dd/mm/yyyy.
AI: Seems your Excel is set to the 1904 date system (more likely for Mac users than PC users). This is an Excel option. Dates in Excel are index numbers that by convention start either in 1900 or 1904.
The setting may be changed in Excel under Options > Advanced > When calculating this workbook. |
H: How do I revert to classic Google Calendar?
November, 2017: Google Calendar offered me a new look. I tried it and would like to revert to the previous version. I checked the help pages and read that I should click on the little gear icon and then would see "Back to classic Calendar." But I don't have a little gear icon, and when I go to Calendar Settings, I don't see a way to return to classic calendar.
AI: This might be a result of your viewport size. The "gear/settings" icon only appears intermittently at top right for select viewports.
It appears between 530 - 600px and above 800px.
You could try zooming in or out to force it to appear and be toggle-ready. |
H: Sum all numbers converting all negative numbers into positive numbers
I have a column of numbers and would like to know the total after everybody has paid me back, but I have negative numbers currently in there:
So the total of this should be 95, currently if I do a sum it will be 75.
This is what I currently have:
=SUM(IF(B2:B27<0,-1*B2:B27,B2:B27))
but this doesn't work of course as it does it on the total of all the rows within the range in the column.
AI: Please try:
=ArrayFormula(sum(abs(B2:B27)))
ABS
(For an answer of 105 if all the numbers displayed fall into the range (and no others).) |
H: Average across sheets Google Sheets
So lets say I have sheet1
a | 4
b | 5
c | 33
d | 55
and sheet2
a | 1
b | 2
c | 3
e | 2
And on sheet3 I want to get it in this kind of format.
name | average | number of times referenced?
a 2.5 2
b 3.5 2
c 18 2
d 55 1
e 2 1
How would I go about doing this?
AI: Please try something like:
=query({Sheet1!A1:B10;Sheet2!A1:B10},"select Col1, Avg(Col2), count(Col1) where Col1 is not NULL group by Col1 label Col1 'name', count(Col1) 'number of times referenced?', Avg(Col2) 'average'")
Adjust ranges to suit those you did not mention.
QUERY
For your sample not necessary but you might want to insert order by Col1 asc before label. |
H: Stop automatic sort of column 1
So lets say I have sheet1
a | 4
b | 5
c | 33
d | 55
and sheet2
a | 1
b | 2
c | 3
e | 2
And using this query
=query({Sheet1!A1:B10;Sheet2!A1:B10},"select Col1, Avg(Col2), count(Col1) where Col1 is not NULL group by Col1 label Col1 'name', count(Col1) 'number of times referenced?', Avg(Col2) 'average'")
I get sheet 3 below
name | average | number of times referenced?
a 2.5 2
b 3.5 2
c 18 2
d 55 1
e 2 1
The problem is it is automatically sorted by the name column, but I would like to be able to sort by all 3 columns if possible.
an example if I decided to sort by average it would look like
name | average | number of times referenced?
d 55 2
c 18 2
b 3.5 2
a 2.5 1
e 2 1
AI: Either adapt the QUERY to sort according to the desired column (and then again for a different choice), for example to sort on average descending insert
order by Avg(Col2) desc
before label, or:
Select/Copy/Paste special/Paste values only and then apply the standard sheet sorting. |
H: Remove Header from GOOGLEFINANCE query
I want to create a graph with different stock values starting and ending at a certain day. To do that I create a table like this:
Where the first column is the market and the second one is the ticker of the company. Under both of them is the name of the company combined in two cells.
Now, I want to make a call to Google Finance to get all the stock values daily since a date specified in other cell and sheet:
=GoogleFinance(""&A1&":"&B1; "price"; Stocks!A28; TODAY())
This returns X rows x 2 columns with the headers Date and Close. i.e:
What can I do to remove the header row, "Date" and "Close", from the table?
I saw another question using the function INDEX to return a value of the array, but I think it only returns one single value and is not possible to return a lot of them starting with an offset:
=INDEX(GoogleFinance(""&A1&":"&B1; "price"; Stocks!A28; TODAY());2;2)
I also tried using FILTER or OFFSET but I don't know if they just don't work for this or I'm doing something wrong.
AI: Please try:
=query(GoogleFinance(""&G1&":"&H1; "price"; Stocks!A28; TODAY());"select * label Col1 '', Col2''")
QUERY |
H: How do I add durations together inn the same Google Sheets cell
I would like to numbers formatted as 'durations' together using a formula in a Google Sheets cell. If it was two numbers it would be very simple...
=1+2 would show as 3
but if I do this...
=00:10:00+0:20:00, I get an #error
I've tried =(00:10:00)+(0:20:00) and =DURATION(00:10:00)+DURATION(00:20:00) but they also come out as #error. Looking around the docs and reference material I can't see how you handle durations in this way.
I know I could have each duration in two different cells and use a third cell to add them together but the way my Sheet is organised this doesn't work for me.
AI: =TIMEVALUE("00:10:00")+TIMEVALUE("00:20:00")
Format the resulting decimal as DURATION |
H: How to match based on ranges using formulas?
I have the following
lower upper
1 30
0.5 20 30
0 10 20
-0.5 0 10
-1 0
Now, I have:
Mike 12
Tim 35
Fred -5
Paul 8
Joe 28
I want to create a column C where a formula looks up the range puts in the correct number.
Mike 12 0
Tim 35 1
Fred -5 -1
Paul 8 -0.5
Joe 28 0.5
How to do this?
I have created a sample sheet
https://docs.google.com/spreadsheets/d/1wOHSuZW4tLnjf7peo_lTufxJGJkr4KKS2Q0RmuoqLrA/edit#gid=0
AI: Assuming the first table is in A1:C6, And the second table in A10:B17, C10:
=INDEX($A$1:$A$6,MATCH(B10,$B$1:$B$6,-1))
Drag fill down. |
H: Small letters in superscript in Gmail subject line
Twitter sends email notifications with the subject in small letters raised above the base line:
How can we do this in our messages?
AI: They insert Unicode superscripts in subject line. You can do, too: there are sub/superscript generators online, for example this one. Example:
da_667ᴺᵉᶜᵏᵇᵉᵃʳᵈ ᵗᵒᵒ ʰᵃᶦʳʸ ᵗᵒ ʰᶦᵈᵉ Tweeted:
In principle, one can type these directly but you'd have to know the Unicode code points and how to use them to enter characters on your device. |
H: How to remove profile picture in Google account?
I am looking for remove my profile picture and keep default Google account profile picture.
AI: To remove/disassociate the photo on your Google Account Profile:
when you are signed into a Google service and click your avatar/photo in a Google service, click the Google + Profile link from the dropdown menu that appears.
Then click the "Edit Profile" button that appears.
In the popup window, rather than clicking the photo, click the "i" information icon (bottom right of attached screenshot).
On the "About Me" page that opens, click the edit icon at the right of the banner.
Now click the edit link on either photo. At the bottom of the popup, you'll see a NO PHOTO button. |
H: Can I add more than one business to a Google My Business account?
I have a Google account, and when I login to Google My Business, I have one business that I can manage. I am looking to add a completely separate business. I'm not looking to add multiple locations/branches of the same business/chain.
Is it possible to add a second, separate business here, that I can manage from the same account?
Or do I have to create a completely separate Google account, attach a separate Google My Business account, and add my new business there?
AI: I did some more research and the answer seems to be that I need to create a separate Google account. Adding a second "location" to my existing Google My Business account should be done if I'm adding a second branch of the same business. I say that because of the instructions on this Google page. The verbiage is:
All locations must have the same name unless the business’s real world representation consistently varies from location to location. All locations must also have the same category if they provide the same service.
That still could be construed as a little vague. But in my case the second business is not the same category as the first, so I'll take this to mean that I should not add it as a second "location." |
H: Can I be forced to keep my Wikipedia account?
I have an account on the Scratch Wiki but I have been informed by the site that I am not allowed to delete this.
I have had several messages informing me that I am not allowed to delete the data that I posted on the site. I want to remove my data and my account but I keep getting warning messages. I want to get rid of this website. I am outraged by the treatment that they have given me, surely I have rights to what data and accounts I have online.
How should I go about deleting my account and removing my data from the site?
What legal rights do I have surrounding this?
UPDATE
I have contacted Scratch about this and they replied:
As an EU citizen, you have the right not to have your data on EU sites. This is the Scratch Wiki. The same terms of service apply to this site as the Scratch site. Scratch's terms of service state that US law applies.
Besides this, you agreed to have your information posted on this site when you posted it. Even if your talk page is blanked, other users can see previous revisions using the page history. Even if it's deleted, admins can still see deleted revisions, amounting to the same thing.
If you want to blank your talk page, please discuss it with other users first. Once a consensus has been reached, further action can be taken. However, your talk page should never be deleted - it is a place for other Wikians to contact you. THANK YOU FOR READING THIS. IF YOU SKIPPED OVER IT, GO BACK AND READ IT.
I am told I have to discuss leaving with other users.
Why is my decision to leave the website in the hands of non-qualified people?
The site has an age demographic of under 13 so how are minors allowed to decide whether I am allowed to keep my account?
How do I delete the account?
AI: Content published by Scratch Wiki is published under a CC Attribution / Share-Alike 3.0 licence (Creative Commons), which is non-revocable:
What if I change my mind about using a CC license?
CC licenses are not revocable. Once something has been published under a CC license, licensees may continue using it according to the license terms for the duration of applicable copyright and similar rights. As a licensor, you may stop distributing under the CC license at any time, but anyone who has access to a copy of the material may continue to redistribute it under the CC license terms. While you cannot revoke the license, CC licenses do provide a mechanism for licensors to ask that others using their material remove the attribution information. You should think carefully before choosing a Creative Commons license.
and:
What happens if the author decides to revoke the CC license to material I am using?
The CC licenses are irrevocable. This means that once you receive material under a CC license, you will always have the right to use it under those license terms, even if the licensor changes his or her mind and stops distributing under the CC license terms. Of course, you may choose to respect the licensor’s wishes and stop using the work.
Legal advice however is off topic here (IMO) though I doubt MIT is legally entitled to force you to retain your account (that is, maintain a public connection between your personal details and the content you have contributed). SE for example is prepared to consider deletion of a user's account while retaining the Q&As such a (former) user has posted. |
H: Google Sheets Alternate Row Color by Unique Sorted Names
Background
I have a sheet that is sorted by Country Names, all unique Country Names are associated with more than one City.
Question
How do I alternate the color of every other Country Name, such that I can more easily distinguish which Cities belong to which Countries?
Data sample:
A B
1 Finland Helsinki
2 Finland Turku
3 France Lyon
4 France Metz
5 France Paris
6 Germany Aachen
7 Germany Berlin
8 Germany Bielefeld
9 Italy Milan
10 Italy Pavia
11 Italy Pesaro
12 Italy Rimini
13 Italy Rome
14 Norway Bergen
15 Norway Oslo
16 Norway Stavanger
17 Norway Trondheim
AI: Please select ColumnsA:B and apply apply a Custom formula is of:
=and(A1<>"",isodd(counta(unique($A$1:$A1)))=TRUE)
with one formatting of choice, and:
=and(A1<>"",isodd(counta(unique($A$1:$A1)))=FALSE)
with a different formatting of your choice.
AND
ISODD
COUNTA
UNIQUE |
H: How to get adjacent cell of matched element in Google Sheets?
I have two columns (A and B) in a Google spreadsheet:
A B
Number Description
2 desc1
5 desc2
1 desc3
3 desc4
How can I return the content of cell B that's next to the minimum number in column A?
(In this case it's desc3 since 1 is the minimum number in A.)
AI: That is not very accurate example, but it should give you your result and workability.
=indirect("B"&ArrayFormula(sum((row(A2:A5)*(A2:A5=MIN(A2:A5))))))
Explanation:
We will use =indirect approach formula.
--- "B" by this we will define what column will be returned
--- & this is delimiter that will connect "B" letter of searched column with following returned number of "row"
then goes the ArrayFormula function
--- row(A2:A5)*(A2:A5=MIN(A2:A5) is the range of rows that will be searched for MIN(A2:A5) criteria to return us the needed "row".
Thus we have connected "B" + "3" and got =B3 cell value. |
H: How can I activate 'Group Insights' on Facebook?
I manage more than one Facebook Group and I noticed that not all of them show the feature "Group Insights".
Group 1
Group 2
Question: How can I activate this feature?
AI: The Facebook automatically enables "Group Insight" feature as soon as you have 250 members on your community.
For further information check out this post on Facebook's documentation. |
H: Show data validation dropdown on cell if another cell isn't empty using custom formula
I've been trying to adapt a few other approaches to this, but without much luck.
I want to create an approval dropdown. Each request could have up to five rows, but I want just a singular dropdown to display the Approval Status on the first line of the request. A mockup of what I'm thinking:
In my example, I'd like to check A2 to see if it has any data. Then if it does, show the approval status data validation dropdown (in ColumnJ) with the options Pending, Approved, Denied. The problem I've run into is that if I use a custom formula in the data validation, it doesn't allow me to create a list of options in the dropdown (or create a list from a range) that would show the dropdown with the arrow, or at least I haven't found a formula that will allow me to do that.
Is this even possible, or are the list and custom formula criteria not compatible?
AI: Using a custom formula for validation never creates a dropdown. Dropdowns are available only for lists of values that are either entered directly into the validation rule, or are contained elsewhere in a sheet ("list from a range").
Possible workaround: use "list from a range" validation rule, referring to a range in which you use some formulas to compute the available options.
Example: cell B3 has validation rule saying "list from the range P3:R3". Cell P3 has the formula =if(isblank(A3), "", {"aa", "bb", "cc"}). So, if A3 is nonempty, than the range P3-R3 contains "aa", "bb", "cc", and these values appear in the dropdown in B3. Otherwise the range is blank, and so is the dropdown. |
H: How do I bulk remove columns from different worksheets in GSheets?
I think I have a pretty simple problem but I just can't seem to find the solution for it.
I basically know how to bulk remove columns in the same sheet, except I'm now working in multiple sheets and would like to remove columns in all of them.
A concrete example would be:
I want to remove column A from all of my 20 worksheets.
How do I go about this? Tried add-ons but didn't seem to find any that did the trick. Are formulas the way to go - can anyone point me in the right direction?
AI: Use the following script, entering it under Tools > Script Editor.
function removeColumnA() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
for (var i = 0; i < sheets.length; i++) {
sheets[i].deleteColumn(1);
}
}
It loops through the sheets of the current spreadsheet, deleting the first column in each.
If this is something you do often, instead of opening the editor each time to run the script, add another function that will automatically add a menu item "Custom > Delete First Columns" each time the spreadsheet is opened.
function onOpen() {
SpreadsheetApp.getActiveSpreadsheet().addMenu("Custom", [{
"name": "Delete First Columns",
"functionName": "removeColumnA"
}]);
} |
H: How do you create an installable trigger for a Google Apps Script?
I've searched all over Google's documentation on this topic and I haven't been able to find a tutorial or article that explains how to do this. I completely understand how to create simple triggers in a project.
I'm trying to populate a ListItem in a Google Form with information that is based on the user using the form. My understanding is that a simple onOpen trigger will not be triggered by users other than the owner of the script, hence my need to use "installable triggers". Please correct me if I'm wrong.
How do you set up an installable onOpen trigger within a script project?
AI: Direct answer.
To create an installable triggers, open Script Editor (Tools > Script Editor in Spreadsheets or Documents, or in "three dots" menu in Google Forms). Within it go to Edit > Current project's triggers. A pop-up window will appear, listing the current triggers (if any) and prompting you to create a new one.
"On open" in a form
The above will not help because what you are trying to do is impossible. For a form "on open" means the form is opened for editing. This is true for both simple and installable triggers. There is no trigger for "someone opened the form to fill it up. You cannot modify the contents of the form based on who opened it.
Other remarks
a simple onOpen trigger will not be triggered by users other than the owner of the script
This is incorrect. I use simple onOpen triggers to create custom menu items in shared spreadsheets, and they work for every user with access to the spreadsheet. |
H: Copying JS array into Google Spreasheet introduces NOT_FOUND cells
I want to create a historic sheet in Google Spreadsheets, where I take the stock data from one sheet and I fill the historic sheet using a specific date in the script.
This is how my sheet looks like:
With my script I want to:
1º Fill the first row with my stock names as header and the last column with the sum of all of them (I'd do this manually latter).
2º For a specified date I want to get the quote price from google finance, only if it was bought before the date in the first column of the data, otherwise just put a 0.
function createHistory() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet1 = ss.getSheetByName("Acciones"); //Get Values
var sheet2 = ss.getSheetByName("Histórico2"); //Write Historic
var source = sheet1.getRange("C2:C67"); //Header
var values = source.getValues();
var result = new Array(source.getNumRows()+2);
result[0] = "";
for(var x=0; x < source.getNumRows(); x++){
result[x+1]=values[x].toString()
}
result[source.getNumRows()+2]='Total';
sheet2.appendRow(result);
Logger.log('Header Saved Successfully');
var source2 = sheet1.getRange("A2:AB67"); //Get all values form the sheet
var values2 = source2.getValues();
var date = new Date(2017,06,20);
var newLine = new Array (source2.getNumRows()+2);
newLine[0] = date;
Logger.log('JS generated date:' + date);
for (var i in values2){ //For each value
Logger.log('This is the value number: ' + i);
if(new Date(values2[i][0]).getTime() <= date.getTime()){
var ticker = values2[i][3];
var market = values2[i][4];
var shares = values2[i][5];
var name = values2[i][2];
var price = values2[i][6];
var costs = values2[i][10] + values2[i][10] + values2[i][12];
var xchange_buy = values2[i][14];
var xchange_sell = values2[i][16];
var sold = values2[i][25];
Logger.log(' Ticker: ' + ticker + ' Market: ' + market + ' Shares:' + shares + ' Name: ' + name + ' Price: ' + price + ' Costs: ' + costs + ' Sold: ' + sold);
var date_formated = Utilities.formatDate(date, "GMT+1:00", "yyyy-MM-dd");
debugger;
var stockPrice = '=' + shares +'* INDEX(GoogleFinance("'+ market + ':' + ticker + '"; "price";"' + date_formated + '"; TODAY());2;2)';
newLine[i+1] = ""+ stockPrice;
Logger.log('The vale that will be stored is: ' + stockPrice);
}
else {
newLine[i+1]=0;
var ticker = values2[i][3];
var market = values2[i][4];
var newdate = new Date(values2[i][0])
Logger.log('The stock value: ' + ticker + ':' + market + ' is not bought till '+ newdate + '.' );
}
}
Logger.log('Lets print the end result:');
for (var i in newLine){
Logger.log(newLine[i]);
}
sheet2.appendRow(newLine);
//}
};
Well, I think this is correctly written, and if I check the log, each values is properly obtained:
And if I take a look at the array before writing it into the spreadsheet, it also looks OK:
Then I go to the spreadsheet and it looks like this, the yellow cell is the one corresponding with the stock name in yellow, and in the middle there are a lot of NOT_FOUND cells, which aren't shown in the log:
I can't understand why does this happen. I'm doing the same in the first step with the header with ".appendRow()" and this problem does not show up.
Edit I've realized that it follows the following pattern:
Let's say the header is:
GOOGLE, AMAZON, QUALCOMM, APPLE
Then the second row is like this:
Date, 10xNOT_FOUND, AMAZON_QUERY, 10XNOT_FOUND, QUALCOMM_QUERY, 10XNOT_FOUND, APPLE_QUERY...
So, the first column is omitted (GOOGLE), and then every 10 cells with NOT_FOUND there is one cell with the correct value.
AI: Well, It took me forever to find out what was the problem. After putting a lot of loggers to see the size of the array, I found out that once I put the array inside the for loop it changed the size. When I looped though it using the same method it just showed the correct values in the log, but using appendrow wrote the whole vector inside the spreadsheet..
So, this is what I updated in the script:
Logger.log('newLine length at the begining is: ' + newLine.length);
newLine[0] = date;
Logger.log('JS generated date:' + date);
for (var i = 0; i< values2.length; i++){ //For each value
Logger.log('This is the stock_value counter: ' + i);
if(new Date(values2[i][0]).getTime() <= date.getTime()){
var ticker = values2[i][3];
var market = values2[i][4];
var shares = values2[i][5];
var name = values2[i][2];
var price = values2[i][6];
var costs = values2[i][10] + values2[i][10] + values2[i][12];
var xchange_buy = values2[i][14];
var xchange_sell = values2[i][16];
var sold = values2[i][25];
Logger.log(' Ticker: ' + ticker + ' Market: ' + market + ' Shares:' + shares + ' Name: ' + name + ' Price: ' + price + ' Costs: ' + costs + ' Sold: ' + sold);
var date_formated = Utilities.formatDate(date, "GMT+1:00", "yyyy-MM-dd");
debugger;
var stockPrice = '=' + shares +'* INDEX(GoogleFinance("'+ market + ':' + ticker + '"; "price";"' + date_formated + '"; TODAY());2;2)';
newLine[i+1] = ""+ stockPrice;
Logger.log('The vale that will be stored is: ' + stockPrice);
}
else {
newLine[i+1]=0;
var ticker = values2[i][3];
var market = values2[i][4];
var newdate = new Date(values2[i][0])
Logger.log('The stock value: ' + ticker + ':' + market + ' is not bought till '+ newdate + '.' );
}
}
Logger.log('Lets print the end result:');
Logger.log('newLine length is :' + newLine.length);
for (var i in newLine){
Logger.log('This is value number: '+ i);
Logger.log(newLine[i]);
}
//sheet2.appendRow(newLine);
//Start at row 1, end at the last row of the spreadsheet
var lastRow = sheet2.getLastRow();
Logger.log('lastRow + 1 is :' + lastRow + 1);
Logger.log('newLine length is :' + newLine.length);
for (var i = 0; i<newLine.length; i++ ){
Logger.log('getRange is: ' + lastRow + 1 + ', ' + (i+1) + ', ');
sheet2.setActiveRange(sheet2.getRange(lastRow + 1, i+1,1,1)).setValue('' + newLine[i]);
}
1º I tried to copy the values one by one instead all at once. It led to even stranger results, because of how the for was looping.
2º I added a lot of logs to check the size of the array.
3º I realized the size of the variable "newLine" changed after the for loop.
4º I changed all the for loops from:
for ( var i in values2)
to
for (var i = 0; i < values2.length; i++)
And that was it. The problem came from a wrong use of the for loop. I think in this link you can read the reason of why this happens. |
H: How to see other users' old tweets?
When I scroll down in an user's timeline, I can only go down so much and the website won't load any more tweets. I tried the search bar and it seems to give tweets from a certain period of time.
I read this and tried Tweetdeck - it also only allows so much scroll down - and I didn't see a place to specify the date range.
AI: You can use Twitter Advanced search, fill out the details in the People and Dates section.
Or you can directly give the date range in search bar with the Twitter handle. For example: from:Bloomberg since:2016-01-01 until:2017-11-28
It will list all the Tweets (including replies) between these dates from Bloomberg. |
H: To share current Google Calendar to another Gmail account?
I know how you can export your calendar but I do not know how you can synchronise your Google Calendar to another of your Gmail accounts.
AI: There's a help article from Google about sharing a calendar with another account:
https://support.google.com/calendar/answer/37082?hl=en
You can share the main calendar for your account, or another calendar
you created.
On your computer, open Google Calendar. You can't share calendars from the Google Calendar app.
On the left, find the "My calendars"
section. You might need to click it to expand it.
Hover over the calendar you want to share, click Options and then **Settings.
To share with individuals: Under "Share with specific people," the email
address of the person you want to share with.
To change wider sharing settings: Under "Permission Settings", choose an option in the drop-down menu.
If someone isn't already added, click Add person.
Click Save.
If you shared your calendar with an individual email address, they'll see your calendar in their "Other calendars" list. If you shared your calendar with an email group, they'll see the calendar in their "Other calendars" list once they click on the link in the email invitation from Google Calendar. |
H: Use content of a cell as part of a formula in another cell
In sheet1 of my Google sheet in A3 I have this formula:
=sort (query({Sheet2!A3:F;Sheet3!A3:F;Sheet4!A3:F;Sheet5!A3:F},), 1, true)
This is displaying all A3:F information from all the sheets listed between {} - which is good.
What I would like to do is to have in A2 the following content:
{Sheet2!A3:F;Sheet3!A3:F;Sheet4!A3:F;Sheet5!A3:F}
And use it in A3 like the following:
=sort (query(<content of A3>,), 1, true)
Why? Because I would like to dynamically create the "sheet selection" from another formula & function that is 'extracting' all the sheets names (or tabs) of a Google sheet. This way, if another sheet (or tab) is created, say Sheet6, value of A2 will automatically change to:
{Sheet2!A3:F;Sheet3!A3:F;Sheet4!A3:F;Sheet5!A3:F;Sheet6!A3:F}
and will update the 'query' of A3
I can't figure out how to include A2 value into formula in A3.
AI: First, you don't need query in your formula, it should be simply
=sort({Sheet2!A3:F; Sheet3!A3:F; Sheet4!A3:F; Sheet5!A3:F}, 1, true)
Unfortunately, it is impossible for such a formula to take a string parameter {Sheet2!A3:F; Sheet3!A3:F; Sheet4!A3:F; Sheet5!A3:F} from another cell. Normally one would use indirect(A2) for this, but indirect does not support array notation {...}, it only works with individual ranges like indirect("Sheet2!A3:F"). Using {indirect("Sheet2!A3:F"); indirect("Sheet3!A3:F")} is possible but this doesn't help with your problem.
Suggestion: since you will need a script to generate the list of all sheets anyway, use it to create the sort formula directly. Here is a function that does this. It gets all sheets, gets their names, excludes certain sheets (including the "masterSheet" where the formula will be located, to avoid cyclical dependency), appends the range to each sheet name (A3:F here), single-quoting sheet names for safety, and then puts all this in the sort formula in cell A3 of masterSheet.
function combineSheetsFormula() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var range = "A3:F";
var masterSheet = "Sheet1";
var excluded = ["Sheet1", "Sheet2", "Sheet3"];
var sheetNames = ss.getSheets().map(function(sheet) {
return sheet.getSheetName();
}).filter(function(name) {
return excluded.indexOf(name) == -1;
}).map(function(name) {
return "'" + name + "'!" + range;
});
var formula = "=sort({" + sheetNames.join(";") + "}, 1, true)";
ss.getRange("'" + masterSheet + "'!A3").setFormula(formula);
}
This function combineSheetsFormula should be launched as explained here, via a function sheetChange that is triggered "on change" and launches the formula function if the change was adding or deleting a sheet.
function sheetChange(e) {
if (e.changeType == "INSERT_GRID" || e.changeType == "REMOVE_GRID") {
combineSheetsFormula();
}
} |
H: Search 'in:inbox is:read' does not work?
I want to move first on read messages in my inbox then go to my unread messages.
I tried to use: in:inbox is:read but is give me wrong results.
I also tried this way in:inbox {NOT is:unread} But I got the same result.
I get all the read messages and few unread messages,
I tried to figure out why this happened and find out that all unread threads includes more than one messages (that say - it include one messages that is read).
Anyway, I want to see only read messages in this section.
I am new in this system, then if not clear please let me know.
AI: I found the answer.
In order to do it - you need to search
(NOT is:unread) in:inbox
This solve the problem while if is one messages that is unread in thread, the thread not will be in the result.
Thanks to @mhoran_psprep on his help |
H: What date formats does Google Sheets recognize?
I have googled this and looked across SO, haven't found anything. How can I get a list of the date formats Google Sheets recognizes?
I found this - https://developers.google.com/sheets/api/guides/formats - about how to format dates to the output you want, but I am looking for a list of the date formats that Google automatically recognizes as dates.
AI: What inputs are understood as a date depends on the locale setting. For example, entering "3.4.2017" in a cell may or may not create a date. See the list of formats by locale.
There are additional variations within each locale. For example, in the U.S. locale, one can use one of the following orders:
month day year
year month day
month day (year defaults to current)
month year (day defaults to 1)
year month (day defaults to 1)
These can be separated either by slashes / or by hyphens -. Separators cannot be mixed; 3/4-2014 is not recognized.
Day can be written in two ways: 4 or 04.
Month can be written in four ways: 9, 09, Sep, September. (Case-insensitive)
The first two digits of year can be omitted if format 1 is used. With other formats such omission either fails to parse, or changes the meaning:
3/2011 is understood as 2011-03-01 (omitted day defaults to 1)
3/11 is understood as 2017-03-11 (omitted year defaults to current)
So, all in all we have 5 orders times 2 separators times 2 options for day times 4 options for month times 2 options for year, for the total of 160 formats, minus some disallowed combinations pointed above, minus some over-counting (e.g., if the month is omitted, we shouldn't count its leading 0 option). All of this is for just one locale (U.S.), and is subject to change without notice.
The following is the extent of date format documentation provided by Google:
Understood formats may depend on region and language settings.
Conclusion: just use ISO 8601. |
H: Dynamic range for filter function
I have the following formula:
=iferror(sum(filter('November 2017'!$H:$H;'November 2017'!$D:$D=$B3)); 0)
Which I use to categorize expenses in a Summary sheet: $B3 would be for example Rent, and this would pick all expenses in the November 2017 sheet marked as Rent, and would compute the sum of it. This works fine.
But this is cumbersome: I have 20 expense categories that I am tracking, and now I want to create the corresponding entries for December 2017, which forces me to go through all the formulas and manually replace November 2017 -> December 2017.
Is it possible to tell filter that the range of operation is specified in certain cell? This way I would just update that single cell (in the top of the December column for example), and all formula would use the right range.
AI: You might use INDIRECT within a query, say:
=query(indirect($B4&"!D:H");"select sum(H) where D ='"&B$3&"' label sum(H) ''")
but really you seem to have backed yourself into a corner. You appear to be trying to analyse data that has already been analysed. A more conventional solution may be to collect all the data together in one place (sheet) and then perform all the analysis from there, say with a pivot table.
B4 would hold November 2017 (as text), B5 say December 2017 and you would copy down the above formula (and across for other categories). |
H: Query function with multiple criteria
I want to use the query function in Google Sheets to filter data from one tab (see data below) to another to meet the following criteria:
F – No. Order = greater than 1
C – Area = City
D – Color =if its black it gotta be higher than 1000 in column E (Value) and if grey it gotta be higher than 150 in E.
I've tried using the below formula but it's not working:
=QUERY(FILTERED!A:F,"SELECT A,B,C,D,E,F WHERE F>1 AND IF D = 'Black' AND E>1000 AND IF D = 'Grey' AND E>150 AND AD='City'")
AI: Please try:
=query({filter(A:F,C:C="City",D:D="Black",E:E>1000,F:F>1);filter(A:F,C:C="City",D:D="Grey",E:E>150,F:F>1)},"select *")
if the required result in the source sheet is:
123457 Rodgers City Black 2500 2
123458 Leaf City Black 1100 150
123459 Russell City Grey 2000 20 |
H: Is it possible to filter out duplicate rows using the QUERY() function only and how?
I receive answers via a Google Forms, which I want to put in a pivot QUERY. I made a query that does the job for all rows, but in the case of duplicate answers, I only want to include rows with the same values in column A, B, and C once.
Here is a sample spreadsheet with the data in the Data sheet, my query in the What I have sheet:
=QUERY(Data!A1:E, "SELECT C, SUM(D) WHERE A IS NOT NULL GROUP BY C PIVOT A",-1)
and what I am asking for in the What I need sheet.
AI: MAX instead of SUM should work (at least for your example!). |
H: YouTube Post Comment button missing most of the time
For some odd reason the "Post Comment" button seems to be missing from YouTube:
I'm using the current version of Chrome and it's frustrating because I comment frequently.
Any suggestions?
AI: The screenshot shows the dark theme, so you are using Youtube New. This issue could be related to it. Try to go back to "Youtube Old". To do so,
Click on the account icon
Click on "Restore Old Youtube" |
H: How do I get a list with all the subscribers of my YouTube Channel?
I have a YouTube channel and tried to find my subscribers at the following link:
https://www.youtube.com/subscribers
I can see the total number of subscribers, but I can not access all the names of people.
"Only subscribers who share their signatures are publicly displayed"
How do I get a list with all the subscribers of my channel?
AI: Short answer
According to the related Youtube help article, only under certain cases it's possible to get the list of all channel subscribers.
From See your YouTube Subscribers List
What subscribers are on the Subscribers List
The Subscribers List shows subscribers who have set their subscriptions to public.
Subscribers who have their subscriptions set to private don't show in a your Subscribers List, even if the account is subscribed to your channel.
Suspended accounts and subscribers that are identified as spam do not count towards your total number of subscribers and don't show in
your Subscribers List.
If you have over 1,000 subscribers, your Subscribers List may not show all of your subscribers.
View your list of public subscribers
Sign in to YouTube.
Go to your Subscribers List by clicking Creator Studio > Community > Subscribers.
You can see your total number of subscribers at the top of the page. The list shows only subscribers who have chosen to share their
subscriptions publicly.
You can sort the list by Most recent or Most popular using the drop-down menu in the top right. |
H: Is there a way to get Google Calendar to hide duplicate events?
I subscribe to the calendars of my team members, but if I invite all of them to a meeting, my calendar fills up with entries for each of them.
AI: Unfortunately, Google never added this capability to it's "calendar" (classic version as of fall 2017); however, there is a Google Chrome plugin that partially accomplishes this.
Event Merge for Google Calendar™ works when viewing via Google Chrome browser on desktop or laptop. It does not actually remove the event from each separate calendar that you may be viewing/following. Nor does this apply to the calendar view built into an Android or iOS device.
Otherwise, refer to https://productforums.google.com/forum/#!msg/calendar/bOSfyMmWIRc/2iDR10NvBhoJ for a history of the request for this feature with Google product support. |
H: Two views of the same data in Google Sheets?
Is it possible to create two views of the same data in Google Sheets? Say you have a list of students and which teacher they have. Can you get a view that sorts by teacher, then student plus a view that sorts by student name, where both are driven by the same data? I'm trying to accomplish something similar to that example without having multiple copies of the original data set.
AI: More than two, if you want, but on a computer. See.
Sort and filter your data
You can sort and filter data in Google Sheets to organize and analyze
it.
Note: Filter views are only available on a computer. See the FILTER article for info about the function.
Sort your data
On your computer, open a spreadsheet in Google Sheets.
Highlight the group of cells you'd like to sort.
To select the entire sheet, click the top left corner of the sheet.
Click Data and then Sort range.
If your columns have titles, click Data has header row.
Select the column you'd like to be sorted first and whether you would like
that column sorted in ascending or descending order. This also sorts numbers.
Click +Add another sort column to add another sorting rule.
Sorting will be done according to the order of your rules.
To delete a rule, click Close Close.
Click Sort. Your range will be sorted.
Filter your data
To see and analyze data in a spreadsheet, use filters. Filters let you
hide data that you don’t want to see. You’ll still be able to see all
your data when you turn the filter off. Filters vs. filter views
Both filters and filter views help you analyze a set of data in a
spreadsheet.
Filters can be useful if:
You want everyone viewing your spreadsheet to see a specific filter when they open it.
You want your data to stay sorted after using the filter.
Filter views can be useful if:
You want to save multiple views.
You want to name your view.
You want others to be able to view the data differently.
Since filter views need to be turned on by each person viewing a
spreadsheet, each person can view a different filter view at the same
time.
You want to share different filters with people. You can send different filter view links to different people so everyone will see
the most relevant information for them.
You want to make a copy or create another view with similar rules.
You don't have edit access to a spreadsheet and still want to filter or sort. In this case, a temporary filter view will be created.
Note: You can import and export filters, but not filter views. Use
filters in a spreadsheet
To temporarily hide data in a spreadsheet, add a filter.
Note: When you add a filter, anyone with access to your spreadsheet
will see the filter too. Anyone with permission to edit your
spreadsheet will be able to change the filter. Filter your data
To filter your data:
On your computer, open a spreadsheet in Google Sheets.
Select a range of cells.
Click Data and then Filter.
To see filter options, go to the top of the range and click Filter Filter.
Filter by condition:
Choose from a list of conditions or write your own. For example, if the cell is empty, if data is less than a
certain number, or if the text contains a certain letter or phrase.
Filter by values:
Uncheck any data points that you want to hide and click OK. If you want to choose all data points, click Select
all. You can also uncheck all data points, by clicking Clear.
Search: Search for data points by typing in the search box. For example, typing "P" will shorten your list to just the names that
start with P.
To turn the filter off, click Data and then Turn off filter.
Sort your data while it’s filtered
You can sort data with a filter turned on.
When you sort your data, only the data in the filtered range will be sorted.
You’ll see a green border around the cells in the filtered range.
Create, name, and save a filter view
Use a filter view when:
You want to save your filter and use it later.
You don't want to disrupt others' view of the data.
You want to share a link to a specific filter with others.
You can’t edit a spreadsheet, but you want to filter or sort data.
Create, save, or delete a filter view
On your computer, open a spreadsheet in Google Sheets.
Click Data and then Filter views and then Create new filter view.
Sort and filter the data.
To close your filter view, go to the top right and click Close Close.
Your filter view is saved automatically.
To delete or duplicate a filter view go to the top right and click
Settings Settings and then Delete or Duplicate. Rename a filter view
On your computer, open a spreadsheet in Google Sheets.
Click Data and then Filter views.
Select a filter view.
Click the filter view name in the top left of the black bar and type the new name.
Press Enter.
See an existing filter view
On your computer, open a spreadsheet in Google Sheets.
Click Data and then Filter views.
Select a filter view.
Your filter will be applied to the spreadsheet.
To close your filter view, go to the top right and click Close Close.
Save a filter as a filter view
On your computer, open a spreadsheet in Google Sheets.
Apply a filter.
Click Data and then Filter views and then Save as filter view.
Use filter view with "view only" access
If you have permission to view a spreadsheet but not edit it, you can
still use filter views:
To apply existing filter views, click Data and then Filter views.
You can create a temporary filter view that only you can use. Because you don’t have "edit" access to the spreadsheet, the filter
view won't be saved.
Only users with permission to edit a spreadsheet can create filter views that anyone viewing the spreadsheet can use. |
H: Is there a way to put an aliased hyperlink in the confirmation message of Google Forms?
I'd like the message to look like:
thanks for your answer, please click here
while the word "here" is clickable and directs to a URL.
I've tried wrapping the hyperlink with quotes, and these while customizing the confirmation message, but they are displayed exactly like the code itself, except for the hyperlink which is clickable:
[alias](hyperlink)
<a href=hyperlink>alias</a>
[[hyperlink|alias]]
HYPERLINK(hyperlink, alias)
=HYPERLINK(hyperlink, alias)
I've found nothing in the API documentation for setConfirmationMessage.
AI: Unfortunately, as of Dec 2017, Google product development has yet to add support for any aliased links in the Confirmation Message displayed upon completing a Google Form.
Refer to these dated forum discussions that indicate the lack of such support:
Adding hyperlinks in a Google Form
https://productforums.google.com/forum/#!topic/docs/3pr_SStcqEQ
https://productforums.google.com/forum/#!topic/docs/_tFH6SSN6Nk;context-place=topicsearchin/docs/authorid$3AAPn2wQf6-liCQ5P4ll4jWQ3ZsBz_4jIji3FNetyUVOU7bhln9oErnFqPU4kCCWYACACeaJpjlGo1%7Csort:date%7Cspell:false
However, if you decide to setup and send an email notification, there are several free add-ons for Google Form, where you can definitely alias hyperlinks and customize even further.
Alternatively, if you elect to share all responses with the recipient, you may be able to apply your confirmation message in the google sheet, and embed an aliased link within that. (To do so, concatenate the text with the hyperlink() function) |
H: Sharing a certain time period of Google Calendar with someone
I'm going on a business trip and my calendar is changing all the time. I want to share that week of the business trip with a friend so he knows when I will be free for coffee.
Now I don't want to share with him my whole calendar because it is just unnecessary, and I don't want to make a separate calendar just to share it. Is it possible to just share a certain time period of the calendar in Google Calendar?
AI: No, I'm afraid not. Have you considered just sharing your free/busy time? That way your friend can see when you have appointments, but not what those appointments are.
Otherwise, no, I'm afraid there's not a way to share a Google Calendar and show only a limited time period. When the calendar is shared, it's either all or nothing. |
H: Would like to exclude any sort of video from a Google search
I have a topic I'm interested in reading about. (DIY hamster toys in this case — but it could be anything.) When I do a Google search there are tons of videos in the results. In my initial phase of research I'd like text and still images only, because videos are time-consuming to skim through, and if I open a lot of video tabs, my browser slows down.
How can I restrict my Google search so that no videos are included in the results?
The most insidious and annoying results I am getting have embedded videos in some of the tutorial steps. These are a resource hog.
AI: Google Search is geared up to return ‘hits’ that are the same as or similar to search terms. It has so much data that a list of “what I don’t want” rather than “what I do want” would be near infinite or useless. Search has only one exclusion operator (-) and that is mainly for text (ref) though it can be used to negate some other search options, such as site:.
However, though Google knows full well about videos (they can be ‘selected’ as a class) it does not seem possible to exclude them as a class (though, for example, .pdf format may be).
DIY hamster toys -AVI -FLV -WMV -MOV -MP4
seems to be quite effective (though many other video formats are possible) but it does, for me, return a YouTube video on the first page of results, whereas:
DIY hamster toys -site:youtube.com
does not, so seemed worth trying. Hence a Comment, that seems to have proved adequate for OP’s current purposes.
DIY hamster toys -site:youtube.com -AVI -FLV -WMV -MOV -MP4
might work slightly better but comparing the different options for performance would be more work than what the OP is trying to avoid.
The issue of embedded videos (avoiding them) may not be surmountable without code. |
H: How to get Google Account last activity info with more precision than a simple date?
Under Gmail page > Activity Information (low right hand corner) page, I can see:
As per the last few rows, the information is certainly not helpful as they are accurate only to the day instead of the hour.
When an account is suspected to be compromised, where to get more useful info/audit/logs regarding a Google Account's security? Is there some Javascript code that I can run on the page itself to obtain this info?
AI: Google offers a very detailed log for you to review:
https://myactivity.google.com/myactivity
It has a date filter and shows minute-by minute activity. |
H: Why can't I see any HD option when uploading a video to Youtube?
I've recorded a 5-minute video on my Android phone. It is 1920x1080 and about 1.5Gb. I just spent nearly an hour uploading this to YouTube and when it finished, the only quality setting available was 360p.
I've removed it and gone to try again but I can see no option anywhere about the upload quality setting.
AI: It takes a while until all resolutions are processed, especially with huge files such as yours. When waiting for a couple of hours or days, additional resolutions should get fully processed. |
H: Why does Google Takeout now offer poorly compressed files?
Every once in a while I use Google Takeout (now called just "Download your Data" or something), to get a copy of all my stuff that Google holds.
Since the last time I did this (about six months ago), the .tbz (bzip2) compression method no longer seems to be available (just .tgz). Also, my email came down in an uncompressed mbox file, which surprised me. That plain text email is massively compressible.
Here is a screenshot from the download page:
Has there been any announcement about the compression methods available for Google Download your Data? I couldn't find anything with a reasonable search.
AI: Sorry about the confusion in Takeout's behavior a couple answers for you (disclosure I work on Takeout)
Why is tbz gone? The usage numbers were extremely low. Zip and tgz had orders of magnitude more usage than tbz. We received a lot of feedback that tbz/tgz was a confusing choice, so we removed the tbz choice.
Why is you mbox uncompressed? This has to do with the maximum archive size setting, in your screenshot it is set to 2GB, so for any file > 2GB we just export a raw file. To work around this choose a larger archive size, up to 50GB.
(This behavior is most useful for zip on older clients where the default windows client doesn't support zip64 and hence larger zip files would be unreadable).
Help center article is wrong. Sorry about that I'll see about getting updated. |
H: Can I access the response ID of a Google Forms response?
Is there a way to get a response ID in the responses spreadsheet of a Google Forms?
I need it in order to keep track of responses that may have been edited as I match them with my own database of responses. An edited response now looks just like a new response. It has a different date/time and a different position in the spreadsheet. I cannot match it by email address, because there may be multiple responses with the same email address.
If I disable edits, people who have the edit link can still edit their response. Then Google Forms treats this as a new response, keeping both the old and the new response.
This answer seems to indicate that it is possible to get a response ID through Google Apps Script: Get the Id of the response from Google Forms via a Google Apps Script.
Is this the only way?
I don't know how to use Google Apps Script, so it would take me some time to learn.
AI: Yes, Google Apps Script is the only way to get the response id.
Check out the forms and spreadsheets add-ons, maybe there's one that fit your needs. |
H: Create multiple menu items
I have two scripts I'm making:
Shorten URLs within a Google Sheet
Printing a single sheet and sending this as a PDF to a specified email
I have successfully created the first script and added it as a menu item in my Google Sheet, but notice that when I started working on the second script, the first menu item has disappeared!
Is there a way to have both scripts show as menu items please?
AI: Rubén pointed out an example using getUi method, and here is a different one, using addMenu method. "Custom" is the menu name that will appear in the navigation bars, and the names in the list below will appear under it, and call the corresponding functions.
function onOpen() {
SpreadsheetApp.getActiveSpreadsheet().addMenu("Custom", [
{name: "Delete and Shift Up", functionName: "deleteAndShiftUp"},
{name: "Insert New Content Above", functionName: "insertContentAbove"},
{name: "Insert Blank Cells Above", functionName: "insertAbove"},
]);
} |
H: "Send and archive" in Gmail using keyboard
Starting recently (or I just didn't notice this earlier) you can send message, that you actually type, by pressing Ctrl+Enter. But (unfortunately?) this just sends the message without archiving it.
Is there any keyboard shortcut / equivalent for "Send and archive" in Gmail?
AI: A quick keyboard substitute for "Send and Archive" -- as noted by Paul Anderson on this Google+ page -- would be to press TAB and then ENTER (or SPACE).
As long as the "Send and Archive" button is enabled (Settings > General > Send and Archive) TAB will shift focus to the button and ENTER or SPACE will select it. |
H: Easy way to convert text lines into table rows?
I have a piece of text with many lines. What's the easiest way to convert these lines into rows of a Google Docs table?
(Sure, I could create a table manually and 1-by-1 copy/paste each line into each row, but that would be a waste of time.)
AI: The problem for a Q&A site is that "easiest" is subjective.
However I can offer one approach which is to copy the text into Sheets and copy that back into Docs.
It is quite practical for me, but might not be "easiest" for you. |
H: How do I recover formatting of logical elements in a Google document?
I created a properly structured Google doc with correct title, heading 1..4 and "normal text" &c.
A "contributor" (&%&%^$!!!!!) did Ctrl-A and set font and font size for the whole document. Now headings and normal text look exactly the same, but the text is still correctly marked as headings vs. normal text.
Is there a way to recover the proper style for headings without going through the whole document and reformatting each heading by hand?
PS. I know about revision history, but there have been far too many content changes since that formatting change, as well as selective formatting changes for some of the the headings (by the same contributor).
AI: This can be done with the following script (see Tools > Script Editor), where the variables h1Style, etc, define the style that should be applied to the headings at that level. The complete list of attributes that could be set is here, but I give representative examples (font family, size, weight, and color) below.
The script loops through the paragraphs (technically, a heading is a paragraph too), and applies the style when the paragraph is of heading type.
function restoreHeadings() {
var h1Style = {};
h1Style[DocumentApp.Attribute.FONT_SIZE] = 20;
h1Style[DocumentApp.Attribute.FONT_FAMILY] = "Georgia";
var h2Style = {};
h2Style[DocumentApp.Attribute.FONT_SIZE] = 16;
h2Style[DocumentApp.Attribute.FOREGROUND_COLOR] = "#555555";
var h3Style = {};
h3Style[DocumentApp.Attribute.FONT_SIZE] = 14;
var h4Style = {};
h4Style[DocumentApp.Attribute.FONT_SIZE] = 12;
h4Style[DocumentApp.Attribute.BOLD] = true;
var body = DocumentApp.getActiveDocument().getBody();
var para = body.getParagraphs();
for (var i in para) {
switch (para[i].getHeading()) {
case DocumentApp.ParagraphHeading.HEADING1:
para[i].setAttributes(h1Style);
break;
case DocumentApp.ParagraphHeading.HEADING2:
para[i].setAttributes(h2Style);
break;
case DocumentApp.ParagraphHeading.HEADING3:
para[i].setAttributes(h3Style);
break;
case DocumentApp.ParagraphHeading.HEADING4:
para[i].setAttributes(h4Style);
break;
}
}
} |
H: Array formula with running total that restarts based on values in another column
I have tried to create a running total with some kind of filter as it were and have been unable to figure out how to do it. I have seen people do a running total using MMULT but not sure how to adapt it.
As you can see in column A there is every time specified if it is a new running total or if it continues and then C need to do a running total on column B until A has "New" in it again.
Google Sheets example.
AI: It's easier to write a custom function for this than to look for a MMULT solution that may not even exist. The function would be used as
=runningtotal(B2:B12, A2:A12, "New")
where B2:B12 is the range with data, A2:A12 is the range with conditions for restart, and "New" is the value that tells that the total should restart.
The script runs a loop over the data, aggregates the total in total, and restarts when needed.
function runningTotal(data, conditions, str) {
var output = [];
var total = 0;
for (var i in data) {
total = (conditions[i][0] == str ? data[i][0] : total + data[i][0]);
output.push([total]);
}
return output;
} |
H: Free storage for documents in Microsoft OneDrive?
Google stores Google documents for free (they do not consume storage space on Google Drive).
Does OneDrive has a similar policy?
AI: It does not appear that Microsoft has a policy like that. I just tested it by uploading a Word document to my OneDrive account, and my used storage amount went up. |
H: How to delete comments on LeanKit
We use LeanKit to manage our development tasks at work. Someone added a comment to a card that has nothing to do with the card. (They thought they were on a different card.)
We want to delete the comment, but there does not appear to be a way to do it. How can we do it, short of deleting the card and re-creating it?
AI: There's currently not a way to delete a comment using the application itself, but the API supports deleting comments. You can use something like curl, Postman, or Node.js to script a DELETE of the comment.
You can see the API reference by going to:
https://{your-account}.leankit.com/io/docs/card/comment:delete |
H: Where are Labs for Google Maps desktop? Are they gone?
Are the lab section for the desktop version of Google Maps gone? Googling only returns old results, although I found this link https://maps.google.com/?showlabs=1 but it does not seem to make any difference.
Specifically I am looking for the lab that allowed the user to show maps with east or west, instead of north, up.
AI: Google shut down most of their experimental labs features in 2011.
The only ones that still remain are for Gmail. |
H: Get frequency result in 1/(units of time)
As a developer, I sometimes want to estimate how long a particular process takes. So I'll let it run a while, take the number of items it completed, and divide by how long it took. So if process X completed 500 items in 2 hours, I can plug it into Google's search engine like so:
500/(2 hours)
to get the rate. However, the result is in Hertz:
1/s is not a particularly useful unit for these quantities. I'd like this one to be in 1/minutes. However, adding in 1/minutes to the end just confuses Google and prevents it from calculating anything:
Google calculator behaves similarly for 1/hours.
How can I get control the units of frequency?
AI: Instead of in 1/minutes, use in minutes^-1:
Google recognizes this as a unit and converts to it, unlike 1/minutes. It might take a bit of getting use to, but it gives you the quantity you want. |
H: How can I add status indicators to a section in GitHub?
I'm reading Basic writing and formatting syntax of GitHub but failed to link directly to section in ordered file like this:
What is the syntax to do like this?:
AI: Status indicators such as are often referred to as Code Repository Badges. These repo badges can be applied with Markdown to show on your wiki or documentation page; many dynamic status badges including the Build | Passing badge may be dependent on integrations with other services.
Github.com/dwyl/repo-badges project has a good list of the most commonly used badges; you can also create your own at http://shields.io, which also has a good list of devops-related and popularity/rating badges. |
H: In Google Calendar with the new design, how to set default event reminder time
By default, I am now getting calendar event notifications from newly created events 10 minutes before the start time. I'd like to change this to be 5 minutes before the start time by default because otherwise I will start working on something else in that 10-minute span and forget about the meeting.
There used to be a global setting for this in the old Google Calendar.
In the "new Google Calendar", I cannot find the setting. Does it still exist? Here's what I see under settings > event settings.
The options under the "notifications" field are:
Off
Browser Notifications
Interruptive Alerts
AI: It appears to be a per calendar setting now.
Click the action menu (three vertical dots) next to your calendar name in the left side bar OR go to Settings then click the calendar you want to change
Go to Event notifications
Change your default notification times
Unfortunately, it doesn't appear to be something you can change globally. A bit of a bummer for people like us who have a lot of custom and shared calendars. |
H: Formula or script for highest number starts with alpha
I am looking for a formula or script that can show me the highest number within a range of values that have a leading alpha character. For example:
D101
D102
D103
D104
J101
J102
J103
I would like a cell that shows the highest D# in column is: D104 & highest J# in col is J103.
I tried using RIGHT, in combination with MAX but was unsuccessful. This is the formula I tried which evaluates to 0:
=MAXA(B:B,RIGHT(B:B,3))
AI: Please try:
=ArrayFormula(max(value(right(filter(A:A,Left(A:A)="D"),3))))
and adjust D to the letter of your choice (or parameterise it).
MAX
VALUE
RIGHT
FILTER
LEFT
Expect 0 from attempts at maths operations on string functions since these always return Text. |
H: Google sheet data validation, text only
I want to make a column (lets say column A) that you can only enter text into it, and reject all numbers.
I have tried "custom" and "=istext()" for the formula... other options don't seem to work
for example:
2 --> reject
hello2 --> accept
12 --> reject
one2one --> accept
AI: Try selecting ColumnA and for validation this formula:
=istext(A1) |
H: Are Google Apps Script web app URLs secret?
I want to use a Google Apps Script web app to download data from a specific Google Forms. In order to avoid having to login to get the data, I want to specify that the web app runs as me, and is accessible from anonymous users.
If I then keep the URL of that web app to myself (except for using it to get the data through the HTTPS request), is it reasonable to assume that nobody else can use it?
In other words, is there enough randomness in the script's URL to make it safe to use for accessing private data?
I want to use this script in a program, but I don't want to figure out how to login programmatically.
AI: As the post linked by Rubén calculates, there is plenty of entropy in the URL of a GAS web app. That post considers document Id, which has 44 characters; by my count, web app URLs have 54-55 random characters. You certainly don't have to worry about brute force attack.
The weak spot is you or your program leaking the URL in some way. This is somewhat troublesome because if you suspect a leak, you can't change the URL easily the way we change passwords. To guard against that scenario, you may want to generate a token for your program to send with its GET or POST request to the app. The app would do something like
doGet(e) {
if (e.parameter.token == "valid_token") {
return information;
}
} |
H: Is it possible to retrieve the names of all my "liked videos" from my YouTube account?
I would like to have a list of the names of all the videos I "liked" on YouTube.
So far, I opened in my web browser the page with all my "liked" videos in the playlist section. I loaded all the page and then went to get the source code. With a Python script I retrieve the names from the JSON file I extracted from the source code but I only got the 100 first videos.
Python script :
#!/usr/bin/python
# -*- coding: utf-8 -*-
import json
# Reading data back
with open('./utubelikes.json', 'r') as f:
data = json.load(f)
videos = data["contents"]["twoColumnBrowseResultsRenderer"]["tabs"][0]["tabRenderer"]["content"]["sectionListRenderer"]["contents"][0]["itemSectionRenderer"]["contents"][0]["playlistVideoListRenderer"]["contents"]
for i in videos:
if (i["playlistVideoRenderer"]["title"].get("simpleText")):
print i["playlistVideoRenderer"]["title"]["simpleText"]
print len(videos)
Any idea on how to get the whole list of names?
I could go copy the content of the page and edit by hand but it would take too much time (1000+ videos).
AI: Takeout allows to download an archive of your Google's data.
Select YouTube
Precise playlists
Choose the JSON format
Click 'Next'
Once your archive created, download and extract it. You can find a JSON file Takeout/YouTube/playlists/_J_aime_.json that lists all the names of the videos 'liked'.
With a simple Python script :
#!/usr/bin/python
# -*- coding: utf-8 -*-
import json
# Reading data back
with open('Takeout/YouTube/playlists/_J_aime_.json', 'r') as f:
data = json.load(f)
for video in data:
print video["snippet"]["title"] |
H: Google Sheets - Problem with ARRAYFORMULA and COUNTIFS Combined
My Sheet1 is being filled automatically by an IFTTT recipe collecting articles matching a subject list of 5 countries, populating a table like this:
Sheet1
A B C
1| Date | Country | Title
2| 2017-12-01 | Iran | bla bla bla
3| 2017-12-01 | North Korea | bla bla bla
4| 2017-12-02 | Iran | bla bla bla
5| 2017-12-02 | Yemen | bla bla bla
6| 2017-12-03 | Iran | bla bla bla
7| 2017-12-03 | Iran | bla bla bla
In Sheet2 I would like to have a table that counts how many articles are written about each country, each day, like this:
Sheet2
A B C D
1| Date | Iran | North Korea| Yemen
2| 2017-12-01 | 1 | 1 | 0
3| 2017-12-02 | 1 | 0 | 1
4| 2017-12-03 | 2 | 0 | 0
To do so, i've placed in Sheet2!A2 the following formula:
=UNIQUE(Sheet1!A2:A)
That gives in Sheet2 Column A a list of all unique date values fed in by the IFTTT recipe into Sheet1.
My challenge is how to count the number of country appearances in Sheet1!B2:B for each unique date.
I tried using the COUNTIFS formula inside an ARRAYFORMULA to automatically populate lines as Sheet1 progresses, like this:
=ARRAYFORMULA(IF(ISBLANK(A2:A), "", COUNTIFS(Sheet1!B2:C,"="&"Iran",Sheet1!A2:A, "="&A2:A)))
However the formula always return the value of 1 for all unique dates.
Any suggestions?
AI: You want a pivot table.
Select the original data, choose Data > Pivot Table.
From the Pivot Table Editor, add as ROW the column "Date", as COLUMN the "Country", and as VALUE the "Title"
Result: |
H: How can I search people on Facebook by name and by year?
I found out how to search by year range (https://www.facebook.com/search/25/30/users-age-2) - it shows people 25-30 years old.
But how to add to this link full name (name / last-name)?
AI: SearchIsBack.com has put together an advanced search interface for Facebook which does multifactor searches like that. By examining the search parameters they use, you can discover Facebook's pattern.
To search for a person by name and age, you would use this format:
https://www.facebook.com/search/1993/before/users-born/1986/after/users-born/str/john%20smith/users-named/intersect/
The above search query will return users named "John Smith" (or some semblance of that name) who were born after 1986 and before 1993.
Some notes for doing an advanced Facebook search this way:
The years you specify are exclusive; meaning that someone born in 1986 or 1993 won't be included in the search results.
Be sure to include an escaped space (%20) between the first and last names. |
H: Gmail authorized application log
Is there a way to see what exactly any authorized app did (i.e. if it sent/deleted any emails I would like to know this)
AI: Unfortunately, as @ale stated, there is no way to review the activity of authorized apps from your Google account. You would have to check the logs for any apps that those authorized apps accessed -- for example, Gmail's sent items or posts made to a social media site.
The only actions you can take regarding an authorized app are to view specific details about it (name, date access was granted, and which permissions it has) and to revoke access. All of this can be done on your Google permissions page. |
H: Google Suite data access by administrator
I have a custom domain e-mail from my university an they are using Google Suite (Gmail, Drive, etc). I was reading this page https://support.google.com/accounts/answer/181692
Does this means that the administrator can access all my e-mails and google drive files?
AI: Short answer
Yes
Source
From https://support.google.com/accounts/answer/181692
It’s important to note that your administrator has access to any data you store in this account, including your email. |
H: 2-dimensional comparison for conditional formatting in Google Spreadsheets
So I have this spreadsheed with two areas (D7:AD16 and D18:AD27). Now I want to format the colors in D18:AD27 such that yellow color is added to every cell that is empty in D18:AD27 but not in D7:AD16.
I use the following custom formula that is applied to one row like this:
=AND(ISBLANK(D23:AD23);NOT(ISBLANK(D12:AD12)))
the conditional format tab:
And it produces the desired result for that row:
Problem
when I try to do this for 2 dimensions I change the formula to
=AND(ISBLANK(D18:AD27);NOT(ISBLANK(D7:AD16)))
and apply it to the area like this:
Which I thought would work, however, this removes all the yellow color-formatting from the area so how can I achieve the desired result without doing this for every row manually?
AI: Of course I just happen to solve it when I was re-creating the problem for this question. Apparently the formula should be for one row and then it is applied row by row when applying it to an area.
It worked by using this custom formula for only the top row:
=AND(ISBLANK(D18:AD18);NOT(ISBLANK(D7:AD7)))
and then applying that formula to the whole area like this: |
H: How can I add the British Columbia holidays to my Google Calendar?
In Google Calendar, I can search for British Columbia, (Calendar/other calendars/Browse Interesting Calendars) and get all the vacation dates for that province, as a long list of dates, which may be added to my calendar one by one.
Is there a way to add all BC holidays to my calendar, in a similar way as I'd add Christian Holidays or holidays in the United States?
AI: If you cannot import those holidays via Google Calendar itself, you can add them through an external source such as:
https://holidays.kayaposoft.com/public_holidays.php?country=can®ion=British+Columbia&year=2018
This site provides ICS URLs that can be imported, eg:
https://www.kayaposoft.com/enrico/ics/v1.0?country=can&fromDate=01-01-2018&toDate=31-12-2018®ion=British%20Columbia&en=1
for the 2018 BC vacation dates in english. |
H: Google Sheets - REGEX Challenge
I have a long Google Sheet column of cells with content looking like this:
#text: Jacob Zuma
@domain: https://www.theguardian.com/world/zuma
#text: World news
@domain: https://www.theguardian.com/world/world
#text: ANC (African National Congress)
@domain: https://www.theguardian.com/world/anc-african-national-congress
#text: South Africa
@domain: https://www.theguardian.com/world/southafrica
#text: Africa
@domain: https://www.theguardian.com/world/africa
I need it to look like this:
Jacob Zuma, World news, ANC (African National Congress), South Africa, Africa
Basically, i'm trying to find a way to get rid of all the headers (#text+@domain) and the URLs, and have only the subjects themselves, all lined-up, separated with commas.
Would appreciate help in figuring out how to do it.
AI: Here is a possible solution.
First, I am assuming that your data is all in column a of the sheet and each two lines of text seperated by a blank line represent one cell. Also I am assuming that the pattern in column a repeats exactly after 5 cells.
Paste the following formula down column b:
=trim(REGEXEXTRACT(A1,"(?:\s)[^\n]*"))
Paste the following formula down column c:
=JOIN(", ",indirect(ADDRESS((row()-1)*5+1,2)&":"&ADDRESS((row())*5,2)))
Your list of desired texts will be in column c. |
H: How to view the exact size of a file in Google Drive (e.g., expressed in bytes)?
How to view the exact size of a file in Google Drive (e.g., expressed in bytes)?
E.g., in the following I would like to know the exact file size, not rounded n KB:
Link to the folder if you want to try: https://drive.google.com/open?id=0B4y6Mj_UZoTEWW9IRWhJV2xnbVk
AI: Apparently there are two different "detail views" in Google Drive. The one I showed in the question doesn't have the exact size, whereas the second one has it…: |
H: Can Search Engines index standalone URLs with long long alphanumeric characters in it?
There's a web application designed by Freshdesk to track customer support requests.
Ironically the application seems to have a feature to create an Internet Public URL for the support request whereby the customers can get to see the progress of their support request by clicking a link without any access control in place.
What this means is the details (Including any confidential personal information) you shared with the company in question thru that support requests are now accessible over the internet as a public URL.
The URL is in the form of domainname/path1/path2/long alphanumeric list of characters something like
http://www.domain.com/path1/path2/6dget35wtsy3738sswfsgdtTyTr4Ew3qyB8UjnhgT541qtG7Y6
Above is just a sample. Imagine this is a public URL but not linked thru any of the pages on www.domain.com. In order for users to access it, they need to have the exact URL with them.
Now my question is would search engines like Google be able to trace such URLs and index them in their search index pages?
If so it's a loss of confidentiality as the data that I shared with the company while opening a support request is now indexed by search engines.
AI: No, search engines do not try to generate all possible URLs in case they find something there. If there is absolutely no link anywhere to a page, and no mention of it in the site's "sitemap", then it will not be indexed.
Google itself relies on this when users share Google Documents accessible to "anyone with a link". Obviously it would be bad for Google Documents reputation if such links ended up in search engine index on their own.
A relevant discussion is How unlikely is it that a Google Doc link is guessed?. Google Documents have a string of 44 random characters, the path you gave as an example has 50. It's not going to be guessed. |
H: Log in using Google without logging into Google
I log into Stack Overflow (and others) using Google. I don't have any alternative means of login in many cases, like an email/password combination - Google is the only way of accessing those accounts.
Now the scenario is that I am on an untrusted computer and want to access eg. Stack Overflow. However, I don't want to log in to Google as I would put my primary email at risk.
How can I log in to SO/some other service anyway?
AI: You can't. Stack Overflow recognizes you only because Google tells it who you are; and for that, Google has to recognize you first.
Alternatives:
Enable two-factor authentication for your Google account. Even if your password is stolen by a keylogger, it won't grant others access to your account.
Use a different account for authentication with less important sites that you will want to use casually at an airport / internet cafe. This may be too late if you already registered, but at least Stack Overflow (and Stack Exchange in general) allows you to add more credentials to your account. |
H: Change ranges by several rows when copying a formula to another row
I have a formula average(a3:a8) that I want to copy many times, changing the range as a block, i.e:
average(a3:a8)
average(a9:a14)
average(a15:a20)
The problem is, when I copy the formula to a new cell, it automatically updates the ranges to be:
average(a3:a8)
average(a4:a9)
average(a5:a10)
How can I do the former?
AI: This requires some arithmetics with row numbers. I will suppose for example that your first formula is entered in D5. Enter the following in D5:
=average(offset(A$3, 6*(row()-row(D$5)), 0, 6, 1))
Here row() is the current row. Since I've subtracted the row of D$5, the difference is zero so the expression is really offset(A$3, 0, 0, 6, 1). Offset means: from A3, move 0 rows down, 0 columns to the right, then take a rectangular range of 6 rows and 1 column. This describes the range A3:A8 and so its average is taken.
What happens if you copy the formula down, say to D6? Now row() has increased by 1, and so the row offset increased by 6. It became offset(A$3, 6, 0, 6, 1) which says: from A3, move 6 rows down, 0 columns to the right, then take a rectangular range of 6 rows and 1 column. This describes the range A9:A14 and so its average is taken. |
H: How to SUM a row of numbers after extracting numbers with REGEX?
I have columns of data that are of the form:
A1: "IDjohn / 35.00 / california"
A2: "IDmike / 25.00 / oregon"
A3: "IDrebecca / 40.00 / ohio"
B1: "IDchang / 20.00 / washington"
B2: "IDwill / 25.00 / delaware"
Each cell is quite dense with info. I'm trying to find a formula that would summarize a whole column after extracting the number between the slashes. So the summation of column A would result in 100.00 and the summation of column B would result in 45.00.
Is such a thing possible? Or do I need to rework the data format into a more parse-able format?
AI: Use regexextract like
=arrayformula(sum(0+iferror(regexextract(A1:A3, "[\d\,\.]+"))))
How this works:
Regular expression extracts the first group of characters that consists of digits 0-9 commas or dots (such as 12,345.67, or 1.23, or just 1). This is a basic number match, you may need a stricter number regular expression.
The wrapper iferror is needed in case there is no such group (maybe the cell is empty), because regexextract has the annoying habit of showing #N/A instead of just giving an empty string.
Adding 0 forces Sheets to treat the result as a number.
Arrayformula and sum perform the summation over a range after running the formula.
A slightly shorter alternative is regexreplace:
=arrayformula(sum(0+regexreplace(A1:A3, "[^\d\,\.]", "")))
Here, regexreplace removes everything that is not a digit or period. An advantage is that there can be no error thrown. A disadvantage is that there is a greater chance of getting wrong results if, say, the third column has some digits 0-9 in it. Those digits would get appended to the number you want. |
H: QUERY where column IS NOT EQUAL to ANY cell in column A of a second sheet
I want it to pull the max value from column F where the corresponding row has C matching the number 14, and A does not have any exact text matches in any cell in column A of a separate sheet.
I feel I might be using the wrong formula altogether to do what I want.
=QUERY('6 Star Gear Sets (Hidden)'!A6:F, "select F where C = 14 AND A != 'Unique Gear (Hidden)'!A6:A order by F desc limit 1")
I am getting a PARSE_ERROR
Here is a link with a copy of the google document I am working on..
https://docs.google.com/spreadsheets/d/15tpl56RTrGGW3lQ3DVXHjpLhG_vbUPZskcUf-h0YuCE/edit?usp=drivesdk
AI: Query is great for comparison of fields withing the same record (row) but it does not easily do the kind of lookups you want. It is possible to manifacture a long query string where A <> 'this' and A <> 'that'... with a separate formula, but this is not an enjoyable exercise.
On the other hand, filter is pretty easy to use here:
=filter(F:F, C:C=14, isna(match(A:A, Sheet2!A:A, 0)))
says: find all entries in F where the C value is 14 and the value in A does not match anything in Sheet2 column A. The function match returns #N/A when the value is not found, and this is what isna looks for.
Then it's just the matter of taking max of those:
=max(filter(F:F, C:C=14, isna(match(A:A, Sheet2!A:A, 0)))) |
H: Can't login to Facebook
I'm having problems to enter my Facebook account, both from the website and the Android app.
When I tried to enter, I was redirected to a page where I was told that I could not login and that I had to upload a photo of my face, that would have been analyzed then deleted:
I tried to do so, but I still can't access my profile, I'm told that they need to analyze it and that for security reasons I would be disconnected:
Has anybody else experienced this problem? How can it be solved? And, the most important thing, what has caused this? I did nothing strange, just regular use.
AI: As you have followed the procedure, now wait for the Facebook response. They will come back (mostly). Generally it takes one week to one month (my experience, there is no fix time).
This happens due to security reason. When Facebook detect some unusual activity which doesn't follow the Community Standards, they ask for identification and other proofs, during the verification period they disabled the account.
Here is the similar problem: https://www.facebook.com/business/help/community/question/?id=1578391448850443
If you didn't hear from Facebook for a long time, you can use this link: My Personal Account was Disabled |
H: Stacking multiple query formulas throws "an Array Literal was missing values for one or more rows"
I am attempting to run multiple queries where it adds rows where if F is blank, then it skips those rows, then runs the query again and replaces row F with row G.
I have a much more complicated formula doing the same thing but more variations, columns D(blank or not) - E and F(blank or not) - G
The following formula works
=SORT(ArrayFormula({
IFERROR(QUERY('6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, D, F, H, N, I, J, K, L, M
where A != ' ' AND D IS NOT NULL AND F IS NOT NULL order by F desc"));
IFERROR(QUERY('6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, E, F, H, N, I, J, K, L, M
where A != ' ' AND D IS NULL AND F IS NOT NULL order by F desc"));
IFERROR(QUERY('6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, D, G, H, N, I, J, K, L, M
where A != ' ' AND D IS NOT NULL AND F IS NULL order by F desc"));
IFERROR(QUERY('6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, E, G, H, N, I, J, K, L, M
where A != ' ' AND D IS NULL AND F IS NULL order by F desc"))
}),5,FALSE)
But my more simple version of the same formula returns an error
=SORT(ArrayFormula({
IFERROR(QUERY('5 Star Clubs (Hidden)'!A6:Z,
"select A, B, C, D, E, F, H, I
where A != ' ' AND F IS NOT NULL"));
IFERROR(QUERY('5 Star Gear Clubs (Hidden)'!A6:Z,
"select A, B, C, D, E, G, H, I
where A != ' ' AND F IS NULL"))
}),7,FALSE)
The error is: In ARRAY_LITERAL, an Array Literal was missing values for one or more rows.
A link to a copy of the google sheets is as follows:
https://docs.google.com/spreadsheets/d/1s6spmfCVP6P331Zr9xfE9kiei3Wly6FRQCdA8Y3e7tA/edit?usp=drivesdk.
Additional Question
UPDATED FORMULA of the original working formula
=SORT(
ArrayFormula(
{
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, D, F, H, N, I, J, K, L, M
where A != ' ' AND D IS NOT NULL AND F IS NOT NULL order by F desc"),{"","","","","","","",""});
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, E, F, H, N, I, J, K, L, M
where A != ' ' AND D IS NULL AND F IS NOT NULL order by F desc"),{"","","","","","","",""});
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, D, G, H, N, I, J, K, L, M
where A != ' ' AND D IS NOT NULL AND F IS NULL order by F desc"),{"","","","","","","",""});
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, E, G, H, N, I, J, K, L, M
where A != ' ' AND D IS NULL AND F IS NULL order by F desc"),{"","","","","","","",""})
}
)
,5,FALSE,4,FALSE)
WORK AROUND
In the 6 Star Gear Sets (Hidden) sheet the formula references, there is a row with A column "zzzzz" and both F and G is blank. When this row is called using the above ArrayFormula, I use a Conditional Format to hide all rows with "zzzzz".
QUESTION
If I remove the row with "zzzzz" in column A from the hidden sheet, I recieve an error.. why?
ADDITIONAL INFO
Breaking the formula into individual QUERY forumlas and removing IFERROR, shows the 3rd query is empty and returns #N/A error, but the 4th query also does not return any results and it does not give such an error. I figured the IFERROR statement would handle this but to no avail.
UPDATE
Found the 4th query isn't returning empty. It is actually returning blank cells. Which again, adds to the list of questions. Because I have the IFERROR function removed and where A != ' ' I thought would handle this. Is that not Where A DOES NOT MATCH blank?
I've tried wrapping it in an IF(IFNA()) formula but I guess you can't use IFNA outside Conditional Formatting because it says IFNA() isn't a known function.
UPDATE 2
For some reason I immediately forgot the part about the number of blank arguments in the IFERROR statement needs to match the number of columns being referenced.
However, =SORT is no longer working correctly as there is now a blank row at the top of the new table and I still do not have a good explanation of why the 4th Query is filling the table with blank rows.
UPDATE 3
In the A column of my "6 Star Gear Sets" sheet, I have a formula that numbers everything in the order they appear unless the B column is blank. For some reason, the blank row that is inserted due to the =IFERROR(,) isn't actually being treated as being blank.
In additional, my =SORT orders everything in descending order by the F and then E column. However, it treats the F and E in the inserted blank row as the highest value row.
UPDATED FORMULA
=SORT(
ArrayFormula(
{
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, D, F, H, N, I, J, K, L, M
where A != ' ' AND D IS NOT NULL AND F IS NOT NULL order by F desc"),{"","","","","","","","","","","",""});
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, E, F, H, N, I, J, K, L, M
where A != ' ' AND D IS NULL AND F IS NOT NULL order by F desc"),{"","","","","","","","","","","",""});
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, D, G, H, N, I, J, K, L, M
where A != ' ' AND D IS NOT NULL AND F IS NULL order by F desc"),{"","","","","","","","","","","",""});
IFERROR(
QUERY(
'6 Star Gear Sets (Hidden)'!A6:AA,
"select A, B, C, E, G, H, N, I, J, K, L, M
where A != ' ' AND D IS NULL AND F IS NULL order by F desc"),{"","","","","","","","","","","",""})
}
)
,5,FALSE,4,FALSE)
UPDATED LINK
Below is an updated copy of my spreadsheet.
https://docs.google.com/spreadsheets/d/17Ev1_Scobnl16H9TuTrHK_es7fZGkMqHyvmpWWWVbow/edit?usp=drivesdk
AI: When stacking arrays vertically, they must have the same number of columns. In case of an error, query outputs a single cell with #REF or #N/A or another message. You put iferror wrapper around it, but that only makes it so the output is one empty cell. Problem is, it is one cell and you need 8 columns to match the other array.
Solution: add a blank row with 8 cells as the second argument of iferror, to be used in case of errors.
=SORT(ArrayFormula({
IFERROR(QUERY('5 Star Clubs (Hidden)'!A6:Z,
"select A, B, C, D, E, F, H, I
where A != ' ' AND F IS NOT NULL"),
{"","","","","","","",""});
IFERROR(QUERY('5 Star Gear Clubs (Hidden)'!A6:Z,
"select A, B, C, D, E, G, H, I
where A != ' ' AND F IS NULL"),
{"","","","","","","",""})
}),7,FALSE)
Specifically, the error occurs because there is no sheet named '5 Star Gear Clubs (Hidden)'. Suggestion: when a formula throws an error, enter its parts in separate cells (without iferror wrappers) to see what they do. |
H: Wrong person identified by Google Photos
In my People and Pets album on Google Photos, it has done a very good job at identifying my friends and family, but there are a few errors (wrong person identified, two albums of the same person, friend not identified).
I cannot find a way to manually tell Google this person is Joe Bloggs etc. Is it possible? (Have tried on both the Android app and the webapp).
AI: I'm afraid you can't tell Google who the person is, only who the person is not.
Open up the "People" album where there's a mistake
Select all of the photos that are mismarked as being for the current person
In the "More options" menu (three vertical dots) choose "Remove results"
If it all works well, you'll find those photos grouped together under a different "face" that you can rename and have Google identify them again.
For the instance of a person album without a name, just open up the album and add a name. It will draw names from your contacts, but you can include a manually created name as well.
For separate albums for the same person, make sure they're spelled exactly the same. In either case, it will work best if you have a Google Contacts entry for the person. Rename one to match the contact; you should be prompted "is this the same person?" and you can essentially "merge" the albums. |
H: How do I notify a Slack group about a Google Calendar event the day before it happens?
I want to send a notify to a Slack group for events a day before.
There is a IFTTT recipe for Google calendar to Slack, but this recipe notifies maximum 45 minutes before the event.
https://ifttt.com/applets/177144p-before-an-event-starts-post-a-reminder-to-slack
Is there a workaround for it?
AI: Here's an app you can connect with your slack channels and get events notifications from Google right there: Slack App
The above link contains the documentation and link to the app to connect that app to your Slack channel.
If you are using this app, you can change the reminder date right from your Google Calendar's event entry, e.g., if you want to get a reminder 30 minutes before the event starts, just do so on your event and you'll get a reminder 30 minutes before the event starts. Same goes for the a day before. Change the reminder setting of that event to a day before the event starts and it's done. |
H: Changing calendar's color in Google Calendar
I would like to create and manage all my calendars' settings on the Settings page on the left side by the following URL: https://calendar.google.com/calendar/r/settings
However I could not find the option to specify the calendar color. Do we get a chance to specify it there on that settings page, instead of going to the homepage https://calendar.google.com/calendar/r and specify the color by pressing the three dots next to calendar?
AI: Nope, sorry. It would appear that color is the one thing you can't change about the calendar from the settings page. For the moment, the only place to change it is on the main page by using the options menu. |
H: Change calendar first day to specific day of week
My work week starts on Tuesday and I wanted to make google calendar meet my work rythm. Do you know how to change calendar first day to specific day of week ?
AI: Unfortunately, as you've already discovered, Google Calendar only offers Saturday, Sunday, and Monday as days to start the week.
I can't imagine that a client-side script could fix this. Your only option then would be to use a third-party calendar that does offer this feature and syncs with your Google Calendar.
If you want to let Google know that this is a feature you'd really like to have, use the "Send Feedback" tool in the gear menu. |
H: How to get URL to the YouTube's advert video?
Given I liked the ad video between the videos, I'd like to note the direct video address of it, so I can save and watch it again later on. How can this be achieved?
AI: While on the ad video, right click on the content and choose Copy debug info. Then paste the content in any textarea or editor (such as Notepad) and search for the line consisting addocid, ad_debug_videoId or ad_docid or value, e.g.
"addocid": "AD_VIDEO_ID",
Once you copy the text string, you can replace it with your original video, e.g.
https://www.youtube.com/watch?v=AD_VIDEO_ID |
H: How do I permanently keep a copy of someone else's public files on Google Drive on my own Google Drive?
There are probably about 20 GBs of videos that I want to keep on my own Google Drive that I found publicly available on someone's Google Drive. I tried adding the files via the option Add to my Drive but that only added a shortcut on my drive. When I check the size of my drive, It says that it's about 278 MBs including 44 MBs of GMail. How can I keep a full-fledged copy of all the files without painstakingly downloading them and then uploading them manually?
AI: On the list of files on Google Drive, over the file name do Right click > Make a copy.
The files will be named as "Copy of original file name". An option to avoid this is to use a script or a third-party tool.
NOTES:
The script complexity will depend on several factors, like the number of files to be copied, if you want also copy the folder structure, etc.
Nowadays Google Drive allows file owners to block viewers from copying files
Related
How to batch copy folders+files from others' share to my Google Drive?
How to copy a shared folder into my own Google Drive? |
H: Possible to perform an "undo" via app script?
I'm trying to cause a 3rd party function (CRYPTOFINANCE()) to update whenever I manually trigger an update. Currently it updates any time I clear the cel contents and hit Undo. So my thinking is to simply create a script that selects the cells I want to update, clears them, and hits undo.
Unfortunately I can't find any way to execute an undo via script. Mostly I find references to it not even existing as a function, however I found reference to model.undo() which sounds like what I need. I just can't figure out how to make it work.
My other thought was maybe there is a way to just select the Undo option from the Edit menu via script, but I have a feeling that's not possible either.
Can anyone suggest a way to Undo via script that doesn't involve using a secondary sheet to store the "undo" data?
AI: Google Apps Script hasn't the undo / redo commands.
NOTE: The Real Time API is not part of Google Apps Script and it's not included in the advanced services.
The alternative is to make the script to keep records of the changes made and if necessary use them to "undo" or "redo" the action. |
H: Does the 2-step verification solves the security problem
I want to ask if the recently well used 2-step verification does actually keep the online accounts safe. (by using a mobile phone) ?
Assuming access to phone stays on our concern.
What could be the case, that someone is able to get access over it ?
AI: 2-step verification (or 2-factor authentication) is a step above 1-factor authentication (just a password) because it requires the user to have access to something (generally, a specific cell phone) as well as know the password in order to log in to an account.
However, 2-factor verification does not eliminate any security concerns. Researchers have shown many times that 2-factor authentication can be compromised. See these articles for some examples:
Google Security Vulnerability Allowed Two-Step Verification Bypass (InformationWeek)
Attackers Hit Weak Spots in 2-Factor Authentication (KrebsOnSecurity)
Two-step verification in PayPal found vulnerable to hacking (TechWalls)
Using 2-step verification is more secure than not using it, by a long shot, but it can still be compromised. Like any other security method, you can always make something more secure, but you'll probably never make it completely secure. |
H: Why Google Translate translate back not same as the first time I translate?
I translated "How to use Web?" but if I translate it back to English, it is not the same as first time I translate this.
Linked to On-Topic question on Linguistics
AI: Because that's not how languages work. Languages rarely have a one-to-one relationship to a word or phrase. We just get "close enough", based on context, to convey the same idea. Further, other languages have different rules about word order, punctuation, etc. There's really no way, except for the simplest sentences, for a machine to take a phrase, translate it to one language, then translate it back and restore the original phrase.
All that said, this isn't really a question about using Google Translate, but rather about translation in general. |
H: Search for files in Google Drive owned externally
I'm working on transferring one of our teams in our Google Apps for Education domain to Google Team Drive but I'm running into a problem with files owned externally. A little background and elaboration:
Our organization hires seasonal employees that make use of and edit a shared curriculum, to try and limit ownership issues with such a high turnover rate we used a 'shared' account. For example curriculum@myDomain.edu. This account owns the vast majority of the documents in it's drive but occasionally employees have created documents using their personal gmail accounts. When I try to migrate curriculum@myDomain.edu's folders and files to Team Drive I get an error because some of the files aren't in my domain.
I'm trying to find a way to search for these files so I can either copy them or delete them prior to transferring folders to Team Drive. Also open to other suggestions
AI: If you set as project policy that all project files should be owned by curriculum@myDomain.edu then search for
-owner:curriculum@myDomain.edu
This will return all the files that are not owned by the specified email address. Bear in mind that there are several other search operators that you could use to build your query and that now it's possible to limit the search to a specific folder by using the search within a folder search feature.
References
Find files in Google Drive
Search within a folder in Google Drive |
H: Recently announced Google Apps Script Dashboard isn't available. Why?
Few minutes ago Google announced a new Google Apps Script Dashboard at https://script.google.com. The announcement includes the following screenshot:
I followed the link using my G Suite for Business and consumer (gmail.com) accounts but instead of the Dashboard the Google Apps Script editor is opened. Could be something from my side that avoid that I be able to access the new dashboard?
At first I think that the problem could be a staged / scheduled rollout as this is something that Google does. Later I remembered that the cache and cookies stored in my device could prevent to see the latest features among other problems so I tried in incognito mode and this works so I deleted the cache and cookies, restarted my laptop and I was able to see the new dashboard. Then I leave the laptop for a couple of hours and when I tried again the problem occurred again.
Following the instructions on the referred announcement I tried to file a bug report but my access is denied, so I made a post on the Google Apps Script Community on Google+.
I found how to create an issue -> https://issuetracker.google.com/issues/71871414
AI: It looks that the issue was fixed
As an alternative to access the Google Apps Script Dashboard try https://script.google.com/home
The above works for me |
H: Update footer date, don't clear the contents
This lovely bit of code for a Google Doc template I use, does exactly what I need it to do except it clears all of the content in my footer instead of just the date. Is there any way to get just the former date cleared and not the rest of my copy? I'm looking to automate my copyright data when a document is opened:
function onOpen() {
var doc = DocumentApp.getActiveDocument();
var footer = doc.getFooter(); //gets the footer
footer.clear(); //clears all data in footer
//Get date
var date = new Date();
var year = date.getFullYear();
footer.appendParagraph(FullYear); //adds date to footer
}
AI: This is basically what replaceText is for:
function onOpen() {
var doc = DocumentApp.getActiveDocument();
var footer = doc.getFooter(); //gets the footer
var date = new Date();
var year = date.getFullYear(); // gets the year
footer.replaceText("\\b20\\d\\d\\b", year); // replaces any 20xx by the year
}
The regular expression "\\b20\\d\\d\\b" is hard to read because of backslash escaping; it means \b20\d\d\b which matches word boundary \b follows by the characters 20, followed by any two digit characters (0-9), followed by word boundary. The word boundaries mean the replacement will not happen, say in "Coffeen, IL 62017". |
H: Let changes be accepted only by admin in Google Docs
I have a Google Docs document and I want to let everybody with the link suggest changes on it, so an admin would accept the correct changes on the document.
I just found the "suggesting" mode, but it is meaningless, since a person with the link and permission to edit can change it directly and won't bother to use suggestion mode.
How can I put all changes the users make as edit suggestions?
AI: People with commenting privileges can only suggest edits to documents, so give those who you would only allow suggesting changes the comment privilege on the document and those who approve the changes editing access to the document.
On the advanced page, it is possible to set the link access to comment. |
H: Filtering a list in Google sheets by value of offset column
If I have a sheet laid out similar to the below:
| T1 | T2 |
one | X | |
two | X | X |
three | | X |
If there a way i can make a dynamically updated list of values from the first column where they have an X in the column offset by (say) one column from their own value ?
So in this case one list that'd be 'one and two' and one that'd include 'two and three'
Something like; =FILTER(A2:A5, OFFSET("C[1]") == "X") ?
Up to now I've been using the funnel filter tool on the column built into the app, which works for smaller item numbers - but really i'd like to be able to have each filtered output on it's own worksheet.
AI: QUERY function could be what you are looking for.
=QUERY(A2:C4,"select A where B='X' label A ''")
and
=QUERY(A2:C4,"select A where C='X' label A ''") |
H: Conditional Google form email notification on submit
I have a script container-bound to a Google form with which I'm trying to send email notifications to departments in certain towns within my organization when a new response is submitted. The town is determined by the first question in the form. Can someone help me get the following to work?
function informDepartment(e)
{
var email = "department." + e.response.getResponseForItem("Town").toString()
.toLowerCase().replace(/\u00e4/g, "ae").replace(/\u00f6/g, "oe").replace(/\u00fc/g, "ue").replace(/\u00df/g, "ss")
+ "@domain.com";
var itemResponses = e.getItemResponses();
var subject = "New submit";
var message = "";
for(var i in itemResponses)
message += itemResponses[i] + "\n\n";
MailApp.sendEmail(email, subject, message);
}
I checked that the script is indeed executed upon submission. Unfortunately, I get an error message 'failed' without any further info on what might be going wrong. I'm unable to view the logs (permission denied for some reason).
AI: You are trying to use Apps Script objects in a way inconsistent with documentation. In particular,
getResponseForItem("Town"). The method getResponseForItem does not take a string as an argument. It takes an Item as an argument.
Also, this method returns an object of class ItemResponse. And toString will only make it "ItemResponse" string. The object has several properties, one of which is getResponse, for getting the response. Other properties are meta-data.
e.getItemResponses() The method getItemResponses is a method of FormResponse object, not of Event object.
message += itemResponses[i]. Again, itemResponses[i] is not a string and coercing it to a string will not be useful.
Corrected version:
var items = e.source.getItems();
var townItem = items.filter(function(i) {
return i.getTitle() == 'Town';
})[0];
var email = "department." + e.response.getResponseForItem(townItem).getResponse()
.toLowerCase().replace(/\u00e4/g, "ae").replace(/\u00f6/g, "oe").replace(/\u00fc/g, "ue").replace(/\u00df/g, "ss")
+ "@domain.com";
var itemResponses = e.response.getItemResponses();
var subject = "New submit";
var message = "";
for(var i in itemResponses)
message += itemResponses[i].getResponse() + "\n\n"; |
H: How do I get sum totals for BUY and SELL entries for specific dates in Google Sheets?
I'm looking to get the difference (profit) between BUY and SELL for each day (column A). I've managed to get overall difference between BUY and SELL for all days but would like have each day calculated in totals per day in B:9 to B11.
So far I have this formula below but it just calculates total difference on all days between BUY and SELL In Column B.
=SUMIF(C:C,"SELL",H:H)-(SUMIF(C:C,"BUY",H:H))
How can I alter this function to reference the totals only for the specific date in column A?
AI: Solution with two functions:
1. Get list of dates
Formula in E2 with QUERY to get all unique dates:
=QUERY(A2:A, "SELECT MAX(A) WHERE A != '' GROUP BY A LABEL MAX(A) ''")
2. Get difference between "SELL" and "BUY"
Formula in F2 with ARRAYFORMULA to get difference between "SELL" and "BUY":
=IF(ISBLANK($E2),"",ARRAYFORMULA(SUM(IF(EQ(A2:A,$E2),IF(B2:B = "SELL", C2:C, MINUS(0, C2:C)),0))))
Drag this formula down to all needed cells in F column.
Note:
format of "Date" column should be set to "Plain text", format of "Order Price" values should be "Number". |
H: Is there a way of preventing Google account password reset by a former team member who keeps changing it?
A former member of our team who originally had our Google account password keeps trying to modify the password and it succeeds! I think he uses the password recovery feature and succeeds in his intent by entering the creation date of the account to verify it, but he should not be allowed to do this and he's causing problems to our current team. He then not only logs in, but also changes the recovery email to his one, the recovery telephone number to his one, etc!! This is crazy... This is happening daily now and we need to find a way to permanently lock him out. We also enabled the 2 steps verification with the same results... Today we added the Google app verification (with an iPhone device of one of our current team member) hoping this will stop the problem showing a notification on the phone regarding the 3rd part attempts and being able to deny them by answering "NO" in the phone Google app popup.
But anyway we wonder if this is going to happen again... What can we do?
AI: You could try to enroll your account into the advanced security program.
From Increase security for your Google Account
To add an extra layer of security to your account, you can enroll in the Advanced Protection Program. This helps protect you against common ways people hijack your account, like getting your emails, documents, contacts, and other personal data.
How the increased security works
To enroll in this program, you’ll need to buy two security keys.
Security keys are small devices that connect to your computer, phone, or tablet. They help protect against hackers because only the person who has the key can sign in to an account. Learn more about how security keys work. |
H: if I use Braintree with PayPal do I pay BOTH Braintree and PayPal?
Braintree's standard processing fee is:
2.9% + $0.30 per transaction
PayPal's fee for online processing is:
a fee of 2.9% of the transaction amount plus a fixed fee based on the currency
I don't want to pay both. Do I pay both fees if I use Braintree?
AI: Full disclosure: I work for Braintree. If you have any further questions, please contact our support team.
For direct credit card transactions, you will pay the Braintree fees. For PayPal transactions you will pay the PayPal processing rates. Although you will be following two pricing schedules, you will not pay duplicate fees on each transaction. |
H: Google Admin Groups is changing my email address to my associated gmail account
I am setting up a Group/mailing list in my Google Admin account, and I am trying to add my email address (personal domain), but Google Admin insists on changing it to my associated gmail account, which I definitely do not want. The domain associated with the G Admin account is not my personal domain (a separate non-profit org).
How can I force my desired email address to be added, without the conversion?
AI: My email address with the personal domain was listed as an alternate email for my Google account. I removed that from my G account, and now I can add that email explicitly. |
H: Google Sheets - Extract URL From a Cell Containing a Hyperlink
I am using an IFTTT recipe which populates Google Sheets cells with a hyperlink formula like this one:
=HYPERLINK("http://twitter.com/guardian/status/941765632642691073", "link")
The result in the Google Sheet are cells with the hyperlink, pointing to tweet URLs, like the one below:
| link |
Is there a way to extract ONLY the URL from the hyperlink into another cell using a formula or a combination of formulas without the use of macro code?
The desired result is the following:
| link | http://twitter.com/guardian/status/941765632642691073 |
AI: I found a solution... I ended up reconstructing the URL using the REGEXMATCH formula inside a copy recipe I made in IFTTT. That throws the formula with the raw data directly into the Google Sheet cell and the process to extract the URL is happening on the fly. The main obstacle is the limited API handlers offered by IFTTT to begin with. I found that zapier offers greater API access, especially when comes to Twitter, but it costs. |
H: Creating a simple timesheet in Google Sheets
In a nutshell I'm trying to build a custom timesheet that automatically calculates hourly pay and so forth and I'm stuck on the following problem.
How do I make Google Sheets calculate the simple decimal of hours worked? I want to enter a start and end time and produce an output like the following.
In Out Total
---------------------------
|7:30 | 12:00 | 4.5 |
---------------------------
AI: Google Spreadsheets stores time/date in multiples of days. (Or, more accurately, in a number since an "epoch" date.)
So, =B2-A2 in cell C2 will give you 0.1875, assuming you have the cell formatted as a number and not a date.
Changing that to =(B2-A2)*24 will give you the value in hours, or 4.5. |
H: Using script to change the look of built-in paragraph styles in Google docs
I need to edit the look of the styles in Google docs. I'm using script to insert text into a blank document. Before I insert the text I define the look of new styles like this:
var vedlegget = {};
vedlegget[DocumentApp.Attribute.FONT_SIZE] = 10;
vedlegget[DocumentApp.Attribute.BOLD] = false;
vedlegget[DocumentApp.Attribute.ITALIC] = true;
vedlegget[DocumentApp.Attribute.SPACING_AFTER] =7;
vedlegget[DocumentApp.Attribute.LINE_SPACING]=1;
vedlegget[DocumentApp.Attribute.FOREGROUND_COLOR] = '#007cb0';
But I also need to use the built-in-styles like Normal and Headings. I need to make a Table of Contents etc.
How do I define the look of the style HEADING1?
I insert the Heading 1 text like shown here:
https://developers.google.com/apps-script/reference/document/paragraph-heading
But I cannot find any way of editing the style.
AI: Use setHeadingAttributes method. For example, here I redefine the styles of Heading levels 1 and 2.
myHeading1 = {};
myHeading1[DocumentApp.Attribute.FONT_SIZE] = 24;
myHeading1[DocumentApp.Attribute.FONT_FAMILY] = "Georgia";
myHeading2 = {};
myHeading2[DocumentApp.Attribute.FONT_SIZE] = 16;
myHeading2[DocumentApp.Attribute.FONT_FAMILY] = "Verdana";
myHeading2[DocumentApp.Attribute.FOREGROUND_COLOR] = "#555555";
var body = DocumentApp.getActiveDocument().getBody();
body.setHeadingAttributes(DocumentApp.ParagraphHeading.HEADING1, myHeading1);
body.setHeadingAttributes(DocumentApp.ParagraphHeading.HEADING2, myHeading2);
Note that this does not immediately affect already existing paragraphs: those stay with their current style unless someone touches their heading level (i.e., selects something from the heading level drop-down, even the same level as the current one). To apply the changes retroactively to existing paragraphs, see this answer. |
H: What's the difference between fans of a Facebook page and followers of a Facebook page?
Some time ago Facebook introduced followers for a Facebook page. So now Facebook pages can have both followers and fans. They have separated statistics and everything. In one of my page, followers and fans grow and different rates.
My question is, What's the difference between fans of a Facebook page and followers of a Facebook page?
AI: Liking a Business Page
When an individual likes your page on Facebook, they automatically opt into following your page. This means that your posts will be seen in their feed and you will be listed in their ‘liked’ directory. It’s important to know that users can unfollow your page after liking your page, which means won’t see your content very often.
Following a Business Page
Facebook users have the option to follow a page without hitting the like button. These types of followers will still see your posts in their newsfeed, but they won’t be considered a like on your page. This option was set up for people who didn’t want to befriend someone on Facebook but still wanted to see their posts |
H: How can I format a pivot table with staggered elements to make narrower?
Right now a typical pivot table looks like this:
This takes up too much room horizontally. I want to format it so that it is narrower and taller, by moving nested blocks down and left.
How can I format it so it looks like this:
Conifer
Cedar
Cedar, E. Wht. -- Skybound
#10 Growbag (42 qt)
12-24 in. 1 %120
2-3 ft 17 $120
...
AI: The pivot table in Google Sheets is almost impossible to format, it drives me nuts! Often I use Query instead. I'm not sure if that will work for you your example, but take a look here on the example sheet here:
https://productforums.google.com/forum/#!topic/docs/zLQMJAtsNLo;context-place=forum/docs |
H: In Facebook, Groups is missing from "more" menu. How can I return it?
It was the case that when I went to More, I saw Groups (see pic headed "first")
I was trying to hide groups from public view.. I didn't and don't see Groups in "more....manage sections". (see pic headed "second")
A guy I spoke to suggested to click Groups and click on the pencil icon and to click "hide section". I did that and now the section is hidden from me, and not showing under More, (see pic headed "third") and still not showing in 'manage sections'.
How can I at least return "Groups" to the More menu?
AI: If you look at the picture titled "Second"
There is an invisible scrollbar.
If you click and drag any of those sections downwards, then it will scroll, and you will see Groups appear. You can then tick it and it will appear under "More", and also as a section under "About" |
H: Issues with a counter
I'm trying to create a button in Google sheets which, when pressed, imports a sheet from a separate spreadsheet into the current one and gives it a name of 'Miscellaneous' followed by the number 1 through to infinity.
For example, the first time the button is pressed it will import a sheet and call it 'Miscellaneous 1' and the second time I press the button it will import a second sheet called 'Miscellaneous 2', so on...
I have the import working and now I'm trying to use a counter to increment the number after 'Miscellaneous'. Can someone tell me what I'm doing wrong? The error is occurring on line 22
var n = 0;
function countUp() {
n += 1;
}
function copyFromTemplate(){
var templateSpreadsheet = SpreadsheetApp.openById('1iXnLkMaPh73lcnkXP1yRV53H824y24FUa1a297OmAKk');
var template = templateSpreadsheet.getSheets()[0]; //Assuming it is the first sheet
//The default name will be "Copy of [original name]". We can use this to change it
countUp();
var newName = ("Miscellaneous " + n);
var currentSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
template.copyTo(currentSpreadsheet).setName(newName);
}
AI: I think the counter only work if all the code is executed at once. Since the function will start again every time you hit the button, it will not count the previous times.
I suggest you count the number of sheets in your Spreadsheet instead, and then subtract the number of sheets that is not a Miscellaneous-sheet.
var number = SpreadsheetApp.getActive().getSheets().length;
var misc = number-2; |
H: How to insert image from the Internet into Bitbucket (bitbucket.org) pull request?
How to insert image from the Internet into Bitbucket (bitbucket.org) pull request?
Bitbucket currently only allows to attach images but I'd like to simply link to an external resource so in case image changes there then it's reflected in Bitbucket.
How to achieve this?
(Research on how it was achieved and a solution is provided in the answer).
AI: It's not trivial and most likely Atlassian didn't want this in their bitbucket.org setup. So it seems to be the undocumented feature. But following these steps allows to insert an image from the Internet by its link:
Copy image URL. Let's use https://www.plantuml.com/plantuml/svg/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000 image URL for our test.
Paste image into comment field:
Press spacebar after the URL so it gets converted into the link:
Enclose URL with "!":
Press "Save".
Editing comment
Challenging is now to edit URL in the comment since the link is now displayed as an image in the edit area. But you can simply use browser's "Copy image address" menu item from the pop-up menu, modify the link as you wish, delete the image and retry the same instruction above. |
H: Gmail account won't complete loading on iMac - now closed as it magically worked today
I have 2 Gmail accounts. My usual one stopped loading at 90% on the blue loading line. It will work if I use the HTML for slow connections but if I try to go to standard view it sticks at 90% again. The other Gmail account worked fine until today when it also stopped at the 90% loading mark and doesn't load any further. What can I do to fix this?
I have OSX 10.9.5, Safari 9.1.3, I have checked for any updates. No Gmail add-ons or browser extensions. I have cleared caches and all history, browser and cookies. I also deleted a big chunk of emails and my usage is less than 50% of my total space allowance on Gmail.
This only happens on my iMac; Gmail works fine on my laptop.
AI: I made no other changes other than in my question but magically today the issue of gmail not loading past 90% is fixed and it works on both my accounts. So this question is now closed. Thanks to all who commented. |
H: Google Music doesn't upload all of my mp3s - how can I troubleshoot what the error is?
I have an assortment of personal/friend gig recording tracks I am trying to upload to Google Music. However, it only uploads about half of them. It says it uploads 302 out of 302 successfully, but then in the app itself, tons of tracks are missing.
In an attempt to debug, I tried to delete one album in particular and re-upload it, and the same tracks 1, 4, 6, 8-11, and 18 are always the songs that show, no errors noted. What is going on? I tried re-tagging everything with mp3tag, and I don't see any permissions issues. Where can I see the logs for this uploader and further diagnose?
I suspect maybe the problem is that they are unique tracks whereas Google Music is tailored to hashing songs to avoid uploading another copy of Lil Wayne's latest hit. I don't know, just a guess.
AI: The answer in my case was that Google Music does not use ID3 tags but uses APE tags, which my files only partially had due to the database not tagging them or something...
Anyways, get mp3tag, go in preferences to use APE (not on by default), then copy all the ID3 tags over to APE. Done and working! |
H: How to unsubscribe from all deleted YouTube channels?
Suppose you subscribed to many YouTube channels. How do you unsubscribe from all deleted or terminated Youtube channels at once without going through each one of them?
AI: Here's a way to unsubscribe from all YouTube channels at once. Go to your subscription manager page and copy this code into your browser's address bar, then press Enter:
javascript:
(function(){
var btns = document.getElementsByTagName('button');
for (var i = 0; i < btns.length; i++) {
if (btns[i].dataset.isSubscribed == "True") {
if (!!btns[i].dataset.showUnsubConfirmDialog) {
delete btns[i].dataset.showUnsubConfirmDialog;
}
btns[i].click();
}
}
})();
I've tested it in Chrome but it should work in other browsers, too. Basically what it does is search through all the buttons on the page, find the ones that are used for unsubscribing from channels, removes the setting to ask for confirmation when you unsubscribe, then it unsubscribes from each one. |
H: How does Google Search determine a user's 'Current Region'?
How can I tell what region Google Search sees as the Current Region and what is that being based on?
This is what I see in
Google Search > Other settings > Language & region > Results region:
AI: How do I see which region is the "Current Region"?
You can see it in the bottom of Search results page:
What is Google search settings Current Region based on?
How Google determines your location when you search
When you use Google, like with Maps, Search or Google Assistant, your current location is estimated from several sources, depending on their availability. These sources are used together to determine where you are:
Your device location
Your Google account addresses like from your home or your work
Your Google Home app for your speaker, Smart Display, or Smart Clock
Your Google products with your previous activity
Your internet connection's IP address
Source: https://support.google.com/websearch/answer/179386 |
H: How do I unhide a card in Mint?
I accidentally hid the Budgets summary card from my Overview in Mint. (Gear Icon → Hide Card). Now the card is missing every time I login.
How can I unhide the Budgets card from my Overview?
AI: You can use Settings → Overview Features to hide or unhide cards on your Overview page.
Log in to your account on mint.com.
Click Settings in the top menu bar.
Open Overview Features in the left sidebar.
Find the card you want to unhide and check Show on Overview.
You can also rearrange cards from this screen by dragging the ☰ icon. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.