text
stringlengths 83
79.5k
|
---|
H: How to hide unused columns in Google Sheets
I would like to make a Google Spreadsheet that has a limited column numbers but I cannot find where is this configured. Looked for this setting with all that I could think would make a good keyword : "Limit google sheets columns", "Google Sheets, hide unused columns" but without luck.
If you look at the to-do template you will notice that the columns goes up to C and not to "Infinite":
How can I achieve this on a newly created sheet ?
AI: To complete Jacob Jan Tuinstra answer and after some research I found out that it was easier than one initially thinks. Just delete the columns manually.
How ?
Select form the last unused to the Z and then right click on a column header and then click on delete columns. Voila. |
H: How can I sum a column with a boolean secondary column
With this kind of Google Docs Spreadsheet:
How can I calculate SUM(C1:C8), but without values where the corresponding D column has a 0 (so, without C1 and C3)?
AI: Try the following formula:
=SUMIF(D1:D8, "<>0", C1:C8)
Not described in the help is the use of <>. This reads as not equal
The rest is explained in the help:
SUMIF |
H: Getting "Hope you enjoy using Facebook tonight" message on Facebook
When I logged into Facebook tonight, this was at the top of my wall. Does anyone know why I was presented with this? I asked several friends but none of them saw this on their walls. Nothing happened if you clicked on it and no other text was presented with it.
At the time, when I logged in, I was using Firefox on Arch Linux. I have never seen messages like this before nor am I continuing to see this message.
We're happy you're here and hope you enjoy Facebook tonight
UPDATE
This definitely seems to have something to do with October. I got that one on October 1st and, and today, the last day of October I received another similar one when I logged into my phone.
AI: Facebook is constantly experimenting with stuff. This is probably just another of their experiments.
There was a lot of talk a few months ago about how Facebook was looking for ways for people to nudge people into posting more positive things to their timelines. I expect this was just something they were trying out. In other words, show this to a few hundred thousand random people and see if what they post that day is more "positive" than people who didn't get the message. |
H: Gmail filter on partial "words"
I've got a Gmail email filter rule set up to prevent email from various senders from going into spam. Here's a simplified version of the rule:
Matches:
from:(abc.org.nz|def.nz|westpac|mailman|ird.govt|mybank|contact)
Do this: Never send it to Spam
As you can see, to keep it short and more generalised (not too generalised so far), I have not listed entire email addresses.
So far the above rule seems to be working for everything listed except "mybank", which still allows emails from "office@mybanksavings.co.nz" to go into spam.
Is this because the filter doesn't match on partial "words" (alphanumeric strings?), or what?
I had a quick look here, but it didn't seem to go into sufficient detail:
https://support.google.com/mail/answer/6579?hl=en
So if you know of a link to support whatever you say, that could also help.
AI: Gmail search doesn't support wildcards, partial words, or regular expressions. By extension, then, neither do Gmail filters. (Some information from Google Support.)
@example.com will work because @ is a word separator. But @example will match @example.com but not @examplexyz.
Some related questions here:
Gmail filter with regular expressions
Filter field "to" contains word
Get rid of Russian junk from my Gmail |
H: Schedule an event for last Sunday (or another day of week) of each month
How do I set a reminder in Google Calendar for an event that occurs on every Sunday before the 1st of the following month?
AI: In the main Google Calendar view, click 'Create'
Click the text box representing the start date (The datepicker pops up)
Choose a month that has 5 Sundays (For example, August 2015)
Pick the 5th Sunday in that month (For example, August 30, 2015)
Click the 'Repeat...' checkbox (The repeat popup appears)
Choose the following options
Repeats: Monthly
Repeat every: 1 months
Repeat by: day of the week
That's it! It should now say under summary: Monthly on the last Sunday, which I believe is what you wanted. |
H: How do I switch back from Google Inbox?
At some point after switching to Inbox for Google I set it as the default that my account sees at mail.google.com. Now, I want to disable it and return to the old Gmail interface, but I can not, for the life of me, find a setting that will allow me to do it.
How do I change my account's mail interface back to the old Gmail one?
If it matters, my account is a Google Apps account, not a Gmail one.
AI: You can stop redirecting www.gmail.com to inbox.google.com through a setting in Inbox as detailed here.
Open Inbox
On the top left, go to the main menu.
Scroll to the bottom and choose Settings.
Uncheck the box for Redirect Gmail to inbox.google.com |
H: Disable Facebook chat availability (Active now, active just now, active x minutes ago)
How do I disable Facebook chat availability? My chat is offline and I am using Windows 7 with Firefox. When I login with my other account through my mobile Facebook and open a chat conversation I see the account that I use on my computer is active "just now" whenever I move the mouse or refresh the page.
How do I disable that? Is there some specific heartbeat message that is possible to be blocked through AdBlock Plus or something?
AI: Okay I have found the solution to block this status.
Basically Facebook uses a timer and so it will send a heartbeat message to their servers with the idle time every x minutes.
Here is an example of such web request:
https://1-edge-chat.facebook.com/pull?channel=userid&seq=0&partition=-2&clientid=18ae8ecc&cb=ie3k&idle=117&qp=y&cap=8&msgs_recv=0&uid=userid&viewer_uid=userid&msgr_region=FRC&state=offline
If you read that link you'll see that &idle=117 is the total seconds the account has been idle for. The state=offline stands for whether the chat is active or offline
Note that I have replaced my userid which is a number of 15 digits.
So to disable this just add the following rule in your AdBlock filters:
https://*-edge-chat.facebook.com
One drawback of this method is that you will not receive messages in real time. You must refresh the page to get the messages. |
H: Google Spreadsheets - How To Have 2 Functions Output Into 1 Box?
I'm using Google Spreadsheets and I'm currently trying to get multiple functions to output into 1 square. In my example:
={IF((B2-D2)>=0,"+"), SUM(B2-D2)}
I get the output I want +7, but it's in 2 different grid boxes | + | 7 |. How can I get both functions to output into the same box?
And this is just an example, so don't get hung-up on alternative workarounds
Google Spreadsheets Example
AI: Then you have to use this formula:
=IF(B2-D2 >= 0, "+" & SUM(B2-D2))
The curly brackets are used for embedded arrays |
H: How to download Google Sheets?
What are ways to download a Google sheet that you were given access to but don't own?
On https://docs.google.com — is there a Chrome extension or anything like that?
AI: Click 'file'
Go to 'download as'
Done! |
H: Query(IMPORTRANGE) function to skip columns
I'm currently using the following function to import data from one spreadsheet to another based on a value in Column K of the source spreadsheet:
=QUERY(
IMPORTRANGE("URL","Sheet Name!A2:P1000"),
"SELECT Col1,Col2,Col3,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14,Col15
WHERE Col11 CONTAINS 'West'",
1
)
Notice I am not importing Columns 4 & 5 (D & E) because in my destination spreadsheet, those two columns are already populated and I don't want those columns to be overwritten.
However, the formula is returning:
#REF Error: Array result was not expanded because it would overwrite data in D2.
Is it possible to edit the formula so that it skips Columns 4 and 5 when it's pasting the data into the destination spreadsheet?
AI: No, it's not possible to "skip columns".
Instead you could use two query functions, one to be used to get the columns A - C, the other to get the columns F and following.
First formula (A1):
=QUERY(
IMPORTRANGE("URL","Sheet Name!A2:P"),
"SELECT Col1,Col2,Col3
WHERE Col11 CONTAINS 'West'",
1
)
Second formula (F1):
=QUERY(
IMPORTRANGE("URL","Sheet Name!A2:P"),
"SELECT Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14,Col15
WHERE Col11 CONTAINS 'West'",
1
)
REMARKS:
Note that instead of Sheet Name!A2:P1000 was used Sheet Name!A2:P as this take the whole columns instead of only 1000 rows. |
H: How to delete the snooze from a snoozed email in Gmail to show it in the inbox category?
I have a snoozed email and want to remove the snooze, having the email appear back in Inbox. How do I do this? I can't find any delete/remove snooze button.
AI: Oh, found the Pin to the Inbox button. It does several things:
Removes the snooze.
Moves to Inbox.
Pins the letter.
I later remove the pin as I don't want it pinned - just in the inbox.
* Kind of hacky, but does the job. My theory for the lack of counter-snooze button is that the Pin has a too close functionality that they preferred to have one less button. Less clutter. |
H: Report dishonest websites to Google Search
Often I land on sites via Google Search that provide different content to the user than what is shown to the crawler. For me, this is time-consuming to visit and check pages that are maliciously optimised for Google, full of tracking cookies, ads and with no real useful content.
Is it OK to report these sites? If so, where and how?
AI: Yes, it's OK to report those sites.
UPDATE 2018-0813
From Report spam, paid links, or malware - Google Search Console Help
If you find information in Google's search results that you believe result from spam, paid links or malware, here's how you can help.
Please follow the above link to reach the official links.
[original link and quote]
From Report Spam - Google Search Help
If you've found a site that looks like spam, let us know by
submitting a spam
report.
It's worth to say that there is a Chrome Extension to report web pages as spam to Google. It's Google Webspam Report (by Google)1.
Notes
1: Thanks to Al E. |
H: Creating Google Form with many list options
I am creating a dropdown list in Google Forms, and have approximately 300 options that my users can choose from. Is there an efficient way to add the options to the Google Form as opposed to manually typing in 300 options on the backend?
AI: Use copy & paste 1.
Reference
1: Quick tip: Copy and paste a list into Google Forms, Google Drive G+ page. |
H: What is the meaning of the different colored lines in Google Ngram?
I was searching for the word "chummy" in Google and went to Ngram. It showed me usage over a time period, but there were two lines, one red and one green. I could not figure out what those lines meant. I did not enter any additional criteria. In some of the corpora, it also showed third orange line which is understandable.
Can someone explain what these initial two lines mean?
AI: Each line are for different capitalizations of the word searched, in this case
red: chummy
green: Chummy
orange: CHUMMY
This happens when the case in-sensitive checkbox is checked.
When I was trying to reproduce the screenshot, I first searched "chummy" in American English corpus just because I'm used to do that. I noted that there was only two lines, so I changed to British English, and noted that the orange line was not present, so I was wondering why this happen.
I think that the variations between American English and British English could be due to variations between the corpus of books being compared. Appears to me that CHUMMY doesn't have significant apparitions in American English but it does have it in British English.
References
Google Ngram Viewer |
H: Conditional format rule "Text Contains" with a "+" misinterpreted as a formula
I'm trying to conditionally format a bunch of cells containing strings. If the string contains either a - or a +, the cell should be highlighted in red or green, respectively. However, when just putting a + o - in the conditional formatting rule it says that the formula is invalid.
If I enclose the + or - with double or single quotes it does not work unless the cell literally contains "+" instead of +.
AI: Use ~ (tilde) to escape + (plus sign), = (equal sign) and also other special characters like * (asterisk) and ? (question mark) that are used as wildcards.
References
Apply conditional formatting rules - Docs editors Help |
H: How do I make row():row() a range?
I would like to count the number of non-empty cells in a range that depends on the row number. I've tried counta(row()+3:row()+4) which always returns 1 as does counta(row():row()) (where I would have expected a circular dependency). counta(12:12) works fine, as does count(13:14).
How do I make a range that is dependent on row()?
AI: You cannot construct a range specification like that. You'll want the =INDIRECT function (documentation), in order to translate a row number into a range.
You must also include the column in your range. If your range spans columns A to C, from row 1 to 3, the range should be A1:C3. This can be constructed from a string: "A" & 1 & ":C" & 3. Replacing the row numbers with row() from your question, we get "A" & row()+3 & ":C" & row()+4, which leads us to the final formula:
=COUNTA(INDIRECT("A" & row()+3 & ":C" & row()+4)) |
H: Apply conditional formatting if other cell is not empty
2 Columns.
C2 | D2
C3 | D3
C4 | D4
C5 | D5
I want it to apply conditional formatting to D2 if C2 has information in it, and D2 is blank. (will be a date). If C2 is empty, then D2 should have no formatting. I don't want D2 to be formatted if C2 has text, and D2 has text.
Picture: I would want it to look like this:
AI: The ISBLANK formula should serve your purpose well.
Create a new rule in the conditional formatting menu. Set the range of your rule to D2:D so that the formatting is applied to column D. Then, in the Condition dropdown menu, select "Custom formula is." In the input field, enter =NOT(ISBLANK(C2:C)). (The = implies the rest is a formula. The NOT formula negates the value returned by its argument. Since you want the formatting rule to apply if the corresponding cell in column C is NOT empty, you will need to use this.) Finally, set the formatting to suit your needs. |
H: Query Select Where is not null vs <>'' not filtering properly
I have an issue with my query where I have numeric cells and text cells that if all are empty I do not want to retrieve them however if anyone of the cells are not empty I want to retrieve that row.
I know that is not Null is used for numeric cells and <>'' is used for text cells.
For example:
Let's say the table looks like this in the original table of data. Sheet is called 'Data'.
Column | A | B | C | D |
Cell Type | Number | Text | Number | Text |
Row1 | 7 | Stuff | 5.33 | Sweet |
Row2 | 8 | World | | Hello |
Row3 | 9 | | | |
Row4 | | | | |
Row5 | | | 9.77 | |
I want to be able to grab all the rows except Row4
If I use this query, it should work correctly with the cell types. Correct?
=Query(Data!A:D, Select D,B,A,C Where A Is Not Null OR B <>'' OR C Is Not Null OR D <>'')
I applied this to my example spreadsheet which uses the same principles as this query. Except that it only works on two of my sheets. The sheets that don't have much data to select; the query only grabs the headers. In my mindfor the second tab called DonSmithPool, it should be grabbing a few of the rows that have text comments and for the last tab called TeachPool it should grab 1 row.
Example Spreadsheet
AI: the query only grabs the headers.
No, it grabs some rows, too. Scroll down... way, way down. There they are. Here's why you are hitting this.
Some of your columns are completely empty. These are interpreted as string by default. Hence, is not null is always true for these, and you get the whole table.
Since you order by B (ascending by default), the huge number of empty rows ends up on top, and leads you to conclude that the query returns nothing.
Unfortunately, there seem to be no way to declare the type of an empty column. This, combined with the "no nulls in string column" behavior, leads to people being driven crazy by not null.
To keep your sanity, either
make sure every column has at least one nonempty cell, with some value of the type you expect in that column.
or, use the less powerful but more straightforward filter command when it suffices for the task. Note that the output of filter can be fed into a query, to combine the best features of both. |
H: How to retrieve the HTML content of a Google Sites footer with a Google Apps Script?
I cannot find in documentation an equivalent to getSummary() or getTitle() to retrieve the HTML content of a Google Sites footer (the custom footer editable through Edit site layout > Custom Footer).
getHtmlContent() only provides the content of the main div #sites-canvas-main.
var url = 'https://sites.google.com/a/test.net/';
var site = SitesApp.getSiteByUrl(url);
var infos = {"title": site.getTitle(), "summary": site.getSummary()};
var page = site.getChildByName("home");
var content = page.getHtmlContent();
AI: One solution using UrlFetchApp:
function GetHtmlFooter() {
var url = 'https://sites.google.com/a/test.net/';
var content = UrlFetchApp.fetch(url).getContentText("UTF-8");
var footer = content.match('<div class="sites-subfooter-content"><div dir="ltr">(.*)</div></div></div>')[1];
return footer;
} |
H: How to auto-update function based on background color
I've been referencing @w0lf's answer to help me calculate the sum of cells based on their background color in Google Sheets. From the comments and some other research it appears that changing the color doesn't trigger a change in the cell. This causes my function to never update.
Does anyone know a way to force my sum function to update when just the background color of a cell in my range changes? I've tried changing the update settings under "spreadsheet settings" already, that doesn't work.
AI: From Sum data based on cell color in Google Spreadsheets by Jeff Lockhart
@aezell In order to have the sumWhereForegroundColorIs() equation
update when the cells in its range change, append the cells within the
2nd argument string as a 3rd argument range like so:
sumWhereForegroundColorIs(getForegroundColor("B3"), "E3:AL3", E3:AL3).
Unfortunately if you need the equation to update when the foreground
color of any of the cells in that range change, this is not possible.
The cell does not fire a changed event when the color changes, only
when the content does.
So, you have to change the content in order to make the referred custom function to be recalculated. |
H: Using Anywhere on Earth time zone in Google Calendar
I'm taking classes online, and they allow us to submit our projects on a given date, up to midnight Anywhere on Earth.
Turns out Anywhere on Earth is an actual time zone where Baker and Howland islands in the Pacific Ocean reside. It's UTC/GMT -12.
https://en.wikipedia.org/wiki/Anywhere_on_Earth
http://www.timeanddate.com/time/zones/aoe
I want to set up Google Calendar appointments for that time zone so I can make sure my project submissions aren't late, but I don't see that timezone listed anywhere. The closest one I have found is "U.S. Outlying Islands/Pogo Pogo", but that's UTC -11.
Is there a time zone that's UTC -12 that I've missed, or is there any way to specify the UTC offset in Google Calendar?
AI: No, there isn't a UTC-12 time a zone in Google Calendar and there isn't a way to specify the UTC offset in the Google Calendar web app.
From Anywhere on Earth
Note that the day's end AOE occurs at noon Coordinated Universal Time
(UTC) of the following day, Howland Island being halfway around the
world from the Prime Meridian that is the base reference longitude for
UTC. |
H: Conditional formatting over wide area of cells, referencing other cells
As data validation does not seem to be able to reference cells for numerical conditions (instead only being able to hardcode numbers); I have fallen back on conditional formatting. However, it does not seem to be possible to have more than any individual column affected by conditional formatting rule formulae
So while it is perfectly possible to do this:
Actually replicating this so that K3:K125 is compared with K1 does not seem to be possible. I would even settle for hardcoding all of the references like so:
However, this does not work.
AI: Both data validation and conditional formatting can reference the values in other cells.
For example, if I require all values in column A to be greater than the value in cell C1, I would use Data Validation with custom formula =A1>C$1. The logic is as follows:
Validation rules (and conditional formatting rules) are entered as they should apply to the upper left corner of the range. From there the reference will be automatically mapped if needed: e.g., the rule =A1>C1 would compare A2 to C2, and so on.
The formula =X>Y returns True if X is greater than Y and False otherwise. Similarly, one can use expressions like =X>=Y or =X=Y. The initial = is just the symbol indicating we have a formula to evaluate.
With conditional formatting, you can use the same custom formula as above. Or, pick "greater than" from the list of criteria and enter =C$1 as the value to compare to. Not C$1, because C$1 is simply text "letter C, dollar sign, digit 1". |
H: Remove single user from "everyone" list
We are using Google Apps and want to remove one of the email addresses from the "everyone" list. Imagine a helpdesk ticket being created every time someone sends an email to everyone.
What options do I have in accomplishing this?
AI: It's not possible to exclude accounts of the domain of the everyone list.
From Add all users to a group - G Suite Administrator Help
You can't edit the members within the All users within your-domain
member. But just like any other group, you can edit the groups access
settings or delete it.
Note: On 2018-07-17 the above quote continue being valid.
Instead, create a group to which you add the desired members by other means. There are several options for that.
Another note: Suspended users will not receive emails sent to a "everyone" list. |
H: Is there any way to increase the maximum number of alerts in Google?
I'm getting the following error when I'm trying to add a new alert:
You have already subscribed to the maximum number of alerts. You must delete one of your current alerts before you can create this one. Dismiss
Is there any way of upgrading the limit? Or it's hardcoded by Google? Any workaround?
I'm already on paid 100GB plan. Would it change anything if I change to 1TB or 10TB plan?
Btw. I've already 1000 configured alerts.
AI: AFAIK there is no way to increase the maximum number of alerts for a given account.
Alternatives
Consolidate alerts (i.e. use the OR operator)
Use a second account.
Notes:
The Google Drive storage plans only increase the storage limit, not other limits like the number of allowed alerts.
Google Apps for Work doesn't increase the Google Alert limits.
References
Is there a maximum number of Google Alerts allowed per user? - Google Serch Help Forum
Search operators - Search Help |
H: How to get the old Google Translate?
Google Translate changed so when you double-click on the translated text it will make it editable so you can change it if there is something wrong with the translation.
The problem is I am used to double-clicking to select all the text and copy it. This option makes it difficult for me to select and copy. (I am aware that there is a button to select all the text.)
I've been translating this way for 3 years and I can't change it, and I also use it a lot.
It will be a great help if you can tell me how I can get the old style back.
AI: I doubt you can actually get exactly the old interface, Google may already remove the code altogether. However you can get something close by disabling JavaScript for the page, you can easily double-click the translated text to select it, as shown in the image below:
Alternatively, even without disabling JavaScript you can do the selection with just an additional double click. Once you double click on the translated text and given chance to edit, you can instead select the text and ignore the editing form. |
H: How do I set up notifications for when a new sheet is added in Google Sheets?
I am part of a large group of users that share a Google spreadsheet and would appreciate if anyone can help me figure a way to set up immediate notifications specifically only for when someone adds a new sheet to the spreadsheet.
I've tried setting up a notification rule through the sheet's tools for when any changes are made and when a new form is submitted but this will prove troublesome even with both the immediate email and daily digest email options as the spreadsheet is being shared by a large group who edit individual cells frequently in a day and also because the rules available currently will result in me receiving a throng of emails but I'm only interested in getting notifications (imperative for it to be immediate) from only two specific users in the group.
I do understand that it might be possible to write a script for this but I have no background or understanding of scripts and also I could not find a script for this in the Google script bank or the new add-ons feature. I have also done an intensive internet search on forums and backlog stack questions but to no avail. Would it also be possible to set notification email to be only sent to me personally and not anyone else on the list?
I hope I've been clear with my questions and would appreciate any help in this matter.
AI: One approach is to use the event object: the eventType property of INSERT_GRID means a sheet was added. Here is such a script. You should fill in YOUR_EMAIL placeholder, and set a trigger (using Resources > Current project's triggers) to run the function "notify" on every change.
function notify(e) {
var ss = e.source;
if (e.changeType == 'INSERT_GRID') {
var subject = 'New sheet added to ' + ss.getName();
var body = 'New sheet was added to spreadsheet ' + ss.getName() + ' located at ' + ss.getUrl();
MailApp.sendEmail('YOUR_EMAIL', subject, body); }
}
Another approach is to use a script to store the number of sheets, and compare the stored and current values. It should be triggered in the same way as the first version.
function notify() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var scriptProperties = PropertiesService.getScriptProperties();
var numSheets = scriptProperties.getProperty('Sheets');
if (numSheets > 0 && ss.getSheets().length > numSheets) {
var subject = 'New sheet added to ' + ss.getName();
var body = 'New sheet was added to spreadsheet ' + ss.getName() + ' located at ' + ss.getUrl();
MailApp.sendEmail('YOUR_EMAIL', subject, body); }
scriptProperties.setProperty('Sheets', ss.getSheets().length);
}
Insertion by other scripts
The above assumes that sheets are only added to the spreadsheet manually. If some other script adds a sheet programmatically, this will not trigger the "change" event: triggers are only fired by user actions.
So, if you expect the sheets to be modified programmatically, there are two options:
The script that adds a sheet should send an email itself.
The function notify (second version, not the first) should be set to run at some intervals (for example every hour) instead of being triggered "onChange". |
H: Simplifying Google Form Checkbox Responses into Itemized List
This is more of a Google Sheets question than a Forms question.
I want to receive form responses from checkbox questions (which unfortunately cannot be separated into separate rows) and flip the data so that responses start their own row on a separate tab.
Here is my basic spreadsheet.
The first tab is the form data I would collect (checkbox answers). Basically, it illustrates who needs to complete what assignment (if names need to be separated I can remove the commas from within the names, eg: Clinton Bill).
The second tab is what I'd like to have happen, with a list and the assignment they need to complete (preferably one per row if there are duplicates).
AI: see cell E2 on your second tab where I entered:
=sort(ArrayFormula( {transpose(split(regexreplace(join(";", 'Form Responses'!C2:C), "(\w+),\s(\w+),\s", "$1, $2;"),";")),transpose(split(join("/", rept('Form Responses'!A2:A&"/", if(len('Form Responses'!C2:C), (len('Form Responses'!C2:C)-len(substitute('Form Responses'!C2:C, ",",""))+1)/2,)) ),"/"))}),1,1)
See if that helps ? |
H: How Do I filter this range of multiple rows and columns only by their headers?
I have a range of names with their team names as headers, how do I retrieve the header for a specific persons name?
Pic:
I have a person's name, and want to find the team they are associated with. how do I do this?
Let's say I have Name 40 using that, what would I need to do to determine the team it's under?
AI: An obvious issue is that a name may not be unique. Below I assume that it is; otherwise my formula won't give a meaningful result, and you will want to use a better identifier than a name.
I will use an offset from the cell with "Team 1". In the example, this cell is A2 but the formula is written to be adaptable to other ranges.
=offset(A2, 0, max(arrayformula(if(A3:D50 = "Name 40", column(A2:D)-column(A2), 0))))
This formula returns "Team 4". Explanation:
The if statement evaluates to 0 at the cells that do not have the needed name. At the cell with this name, it is equal to the column number minus the column number of A2.
After taking the maximum, we just have the single number mentioned above
This number is precisely what is needed for offset(A2,0,...) to return the team name.
There are other approaches: e.g., join each column into a regular expression ^...|...|...|...$ and test the name against each. |
H: How to find people working for a company from LinkedIn?
Looking at a personal profile, it is possible to find the company each one is working for, but how is it possible to do the searching starting from a company?
I can find the company starting from a LinkedIn personal page of any employee, but when I click on the company link I can only view the company page with no more links.
AI: You can use the Advanced Search functionality to search based on company or many other factors: |
H: Store and access my Gmail emails and attachments offline?
What is the best way to download all my Gmail email messages and attachments and retain the option to sift through them (in a user-friendly way)? Kind of like storing Gmail offline. Is there a way to do that?
AI: Gmail, by its nature, is an online keep-all-the-information beastie. While there is a Gmail Offline Chrome Extension, that's really only to allow you to work with (some of) your email when you lack a connection to the cloud. Once you reconnect the information gets synced back up.
You can easily download attachments to Google Drive, but it doesn't keep the connection to the message, and that's just more online storage.
In order to do what you'd want, you'd need to download and install a third-party email client and use it to keep your email messages locally after removing them from your online Gmail account. Thunderbird is one I've used in the past, but there are several that would probably suit. There are probably a couple of ways you could tackle this, but likely you'd keep a separate, offline mailbox with your messages and attachments that you'll have moved from Gmail.
However, installable software is beyond the ken of this site. |
H: Can Google Spreadsheets conditionally format based on a previous cells content?
Is it possible to conditionally format the background colour of a cell, based on the value in the column preceding it?
For example, in the following table (first row/column are titles):
| A | B | C
1 | 1 | 5 | 2
2 | 2 | 7 | 0
3 | 3 | 1 | 2
4 | 1 | 3 | 4
5 | 1 | 5 | 0
6 | 4 | 1 | 2
7 | 8 | 2 | 4
B1 should be green, as it is greater than A1.
but
C5 should be red, as it is less than B1, etc
I'd like this formatting rule to work with any new column I add. The dataset I'm working with is date driven analytics.
Try as I might, I can either only seem to format the cells by:
A fixed number
A fixed cell
AI: You can conditionally format based on another cell or column by selecting your cells, and making a conditional formatting rule for cells "Greater Than" the cell "A1" as shown below.
Sheets uses this as a relative reference that you're comparing the cell to the left of each cell in your selection. |
H: Download .rar attachment failure from draft message
I have this mail draft in my Gmail like for 6-7 years. This draft has an attachment of .rar file which contains a small project that I did when I was senior in college.
I want to send this mail to myself, or just download the attached file from the draft. However, Gmail doesn't let me do that. It pops an error message for either case, saying:
For security reasons, Gmail does not allow you to use this type of
file as it violates Google policy for executables and archives.
Is there a way to get the attachment?
AI: I would configure the account to enable IMAP so that you can download messages (with their attachments) from Gmail using an email program such as Thunderbird, Apple Mail or Microsoft Outlook.
Using a mail client with IMAP gives you an alternate method to access mail messages; GMail labels, Drafts and Sent Messages will appear as folders in the email program.
Describing how to configure GMail with IMAP would be too broad an issue to answer here but Google have lots of good info on how to use Gmail with IMAP. |
H: Google spreadsheet: reformat event data (several dates on one row/event) to create a .csv file (one date per row/event)
I currently have a list of several recurrent events, with dates of recurrence on the same row. I hope to create a .csv file for importing into calendars, so would like to have each recurrent date on a separate row in a spreadsheet.
Not entirely sure how to phrase this, so I set up a sample spreadsheet with what I aim to do (including how far I have gotten with concatenate/transpose/etc).
In short, I have data such as (each character a separate cell in a spreadsheet):
A X 1 2 3
B Y 2 4
C Z 1 5
And I hope to create individual rows for each 'event' (ABC) and 'date' (12345) combination (hopefully keeping the info, XYZ, intact if possible... but can achieve this with lookups if needed later):
A X 1
A X 2
A X 3
B Y 2
B Y 4
(etc)
Any help is greatly appreciated! Including links to anywhere I may have missed online relating to this.
AI: Short answer
Formula using the Google Sheets array handling feature:
=Filter(
{{C5:C7,D5:D7,E5:E7};{C5:C7,D5:D7,F5:F7};{C5:C7,D5:D7,G5:G7}},
Len({{E5:E7};{F5:F7};{G5:G7}})>0
)
Long answer
The question is about normalizing cross-tabbed data. There are a lot of posts about this topic. The basic keywords that could help to find them are
spreadsheet
normalize
cross-tab
Several of the results will be based in a programming language. Others could use "complicated" formulas that could be necessary in complex situations, but in the linked demo spreadsheet, the data is in C5:G7. C5:D7 are the row headings, and E5:G7 are the cross-tabbed data. This could be handle by using a simple solution based on Google Sheets arrays and could be easily adapted to normalize a range with any number of rows and few additional columns.
Google Sheets can handle arrays by enclosing values between curly brackets. Some people call them embedded arrays. This feature could be used to easily normalize simple cross-tabbed data
References
Using arrays in Google Sheets - Docs editors Help |
H: How to copy related row data from Google Sheets remote tab or Sheet into current Sheet with a script?
I could use IMPORTRANGE, but I want to actually place the values themselves into the cells, instead. For sheets with many rows, a lot of IMPORTRANGE formulas can cause lag and slow down performance.
Is there a way to copy data from a row in another sheet that has the same ID number?
AI: Here is an example of how to do this. When "update" or "edit" is selected from the dropdown boxes, data from the other, designated tab's rows are copied into the current sheet.
Here is the script:
function onEdit(e) {
////UPDATE ROWS WITH DATA FROM REMOTE SHEET VIA SCRIPT
///the script below is adapted from https://mashe.hawksey.info/2015/03/google-sheets-move-a-row-of-data-to-another-sheet-based-on-cell-value/
// see Sheet event objects docs
// https://developers.google.com/apps-script/guides/triggers/events#google_sheets_events
var ss = e.source;
var s = ss.getSheetByName("Animals List");
var r = e.range;
var remoteSheet = ss.getSheetByName("List B");
// to let you modify where the action and move columns are in the form responses sheet
var actionCol = 1;
// Get the row and column of the active cell.
var rowIndex = r.getRowIndex();
var colIndex = r.getColumnIndex();
// Get the number of columns in the active sheet.
// -1 to drop our action/status column
var colNumber = s.getLastColumn()-1;
var curNumberCell = s.getRange(rowIndex,2, 1, 1);
var curIDNumber = curNumberCell.getValue();
var curDCell = s.getRange(rowIndex,4, 1, 1);
var curECell = s.getRange(rowIndex,5, 1, 1);
// if our action/status col is changed to update or edit, do stuff
if (e.value == "update" || "edit" && colIndex == actionCol) {
//THE FOLLOWING REPLACES THE FORMULAS OF THE ROW WITH THEIR GENERATED VALUES - UNCOMMENT TO USE:
//var sourceRange = s.getRange(rowIndex, 1, 1, colNumber);
//sourceRange.setValues(sourceRange.getValues());
///Retrieve data from remote tab/sheet that has matching cell value
var values = remoteSheet.getDataRange().getValues(); //IN REMOTE SHEET WE NEED TO SEARCH ENTIRE SHEET
for (var i = 0; i < values.length; i++) {
if (values[i][0] == curIDNumber )
{
curDCell.setValue(values[i][1] );
curECell.setValue(values[i][2] );
}
}
} //end retrieve remote data
} |
H: How to create email signature in Google Inbox?
I'm using Gmail and have been invited to try Google Inbox but the problem is how can I add my own signature?
AI: You can add a signature in Google Inbox by following this tutorial. It says
How to create a signature in Inbox
Open Inbox.
In the top left, go to the main menu.
Scroll down and choose Settings.
On mobile, choose your account.
Select Signature settings.
Make sure the setting is switched to On.
Enter your signature in the text box.
* To see this update on mobile, make sure you're using the updated version of the Inbox app.
Bonus point!
You can just copy paste your signature in Gmail by following this
Open Gmail.
Click the gear in the top right.
Select Settings.
Scroll down to the “Signature” section and just copy your old signature text in the box.
Go back to Google Inbox signature then simply paste it. |
H: How can I tell if my YouTube message was received by the right person?
I sent someone a private message over YouTube, and then checked my Sent messages box to see if it went through.
As you can see, the only username on the page is mine. I cannot double check who the message was sent to.
How can I tell if my message was received by the right person?
AI: In the Community > Messages > Sent page there isn't an indication of to whom was sent a private message and there aren't read receipts for Youtube private messages either so you should wait to get an answer from the recipients to get confirmation that they received each private message and confirm to whom the private messages was sent.
References
Send and receive private messages - Youtube Help |
H: Conditional format formula to select a previous cells content (current cell -1)
Thanks to "Can Google Spreadsheets conditionally format based on a previous cells content?", I understand how to apply conditional formatting to a preceding cell, if I'm using a simple comparison, but what about something more complicated.
For example I have data in a column in the following format:
B4 | C4
--------------------------------------
123 / clientname1 | 143 / clientnamea
345 / clientname2 | 143 / clientnameb
With a one off formula, below, I can split and compare the two numbers:
=(TRIM(LEFT($C4,(SEARCH("/", $C4))-1)))-(TRIM(LEFT($B4,(SEARCH("/", $B4))-1))) > 0
However, how would I create a reusable rule that uses something along the lines of 'current cell - minus - value one cell left', rather than hardcoding $C4, $B4 etc each time?
AI: The answer to the question you linked contains the answer to this one. But since it apparently didn't get through, here it is again:
In conditional formatting, you enter the formula as it should apply to the upper left corner of the formatted range. The spreadsheet will apply it to the rest of the range using relative references. So, if the upper left corner of formatted range is C4, then
=B4 means "the value in the cell to the left of this one".
=$B4 means "the value of the cell in B column of this row"
=C$1 means "the value at the top of this column"
=$B$2 means "the value in cell B2" |
H: What does the number in Trello title mean?
When looking at Trello, I see number in a page title / tabl title.
It looks like
(3) ProjectName | Trello
I have no idea what does the number refer to. There are no new messages, no new cards, no new lists. And it makes me a little nervous.
AI: Oh, it refers to the notifications on top right.
I never actually clicked that icon and I use Trello for months.
All right. |
H: How to check if the value is given in google spread sheet cell
I want to check if the value is given in the cell, start time and end time.
It works fine now with the function like this:
=if(and(C9 > 0, B9 > 0),C9-B9, 0)
But instead of 0 I and to check the condition not equal FALSE.
=if(and(C9 != FALSE, B9 != FALSE),C9-B9, 0)
But the != operator is not supported in google spread sheet.
How can I check if the value is not given in the cell?
AI: The "not equal" operator in Google Sheets is <>, not !=.
Alternatively, you could recast the formula as
=if(or(C9 = FALSE, B9 = FALSE), 0, C9-B9) |
H: Update column with last update of row in Google Sheets... except the header
I've been using this code to find the most recent update of a given row:
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
var r = s.getActiveCell();
if( r.getColumn() != 5 ) { //checks the column
var row = r.getRow();
var time = new Date();
time = Utilities.formatDate(time, "GMT-07:00", "MM-dd-yyyy HH:mm:ss");
SpreadsheetApp.getActiveSheet().getRange("E" + row.toString()).setValue(time);
};
};
The problem is that I'd like to have a header on column 'E' and I need to make sure that the script doesn't overwrite the header if someone changes something in that header row. I've tried using "E2:E" or "E2:1000" as a replacement in getRange but the effect is that when any row is updated, ALL of column E gets updated with the timestamp.
Question is: how do exclude Row 1 from being overwritten by this script?
AI: Short Answer
Replace if( r.getColumn() != 5 ) by if( r.getColumn() != 5 && r.getRow() != 1 ) .
Long answer
&& is the AND operator r.getRow() != 1 compares the row of the edited cell with the row number that you want to be skipped.
Full code minimal modification
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
var r = s.getActiveCell();
if( r.getColumn() != 5 && r.getRow() != 1) { //checks the column & row
var row = r.getRow();
var time = new Date();
time = Utilities.formatDate(time, "GMT-07:00", "MM-dd-yyyy HH:mm:ss");
SpreadsheetApp.getActiveSheet().getRange("E" + row.toString()).setValue(time);
};
};
Full code improved
Taking advantage that onEdit() event gets an event object that include the range.
function onEdit(e) {
var r = e.range;
var s = r.getSheet();
if( r.getColumn() != 5 && r.getRow() != 1) { //checks the column & row
var row = r.getRow();
var time = new Date();
time = Utilities.formatDate(time, "GMT-07:00", "MM-dd-yyyy HH:mm:ss");
s.getRange("E" + row.toString()).setValue(time);
};
};
References
Logical Operators - Mozilla Developer Network
JavaScript Comparison and Logical Operators - w3schools.com |
H: Setting an account picture for "other" accounts when using the Gmail mobile app
Recently I've noticed that if you have a picture associated with your Google account, and you send an email using your Gmail account to someone using the Gmail mobile app. That picture will show on the email instead of a circle with the first letter of their name (see pictures below).
Sent from non-Gmail account:
Sent from Gmail account:
The first picture above is what the recipient would see if I was to send an email from a non-google (no picture) account.
The second is what the recipient sees if I send the email from my Gmail account.
My question is:
Is there a way to set a display picture for all other "non-Gmail" accounts that I have associated with the Gmail mobile app?
For example if I was to use the Gmail app to send an email with my Hotmail account, the recipient (if they're also using the Gmail app) would see the my display picture instead of just a coloured "P" in a circle.
AI: The only way you can get a profile image for your alias email account is if you make it a Google account and then create a profile. So, does your email alias account has a Google/Google+ profile? (FAQ)
If not sign up at (https://accounts.google.com/SignUp), click on "I'd rather use my own email address". Follow the procedure, finish the sign-up. After you set up your non-Gmail address Google account, sign into it, click on the name at the top right, then "View Profile", and then the image silhouette to pick your profile pic. After that, your display picture for all other "non-Gmail" accounts that I have associated with the Gmail mobile app (whatever you want it to be) will be shown. |
H: How can I list all templates available on a MediaWiki Wiki?
I'm editing this MediaWiki Wiki (not Wikipedia etc.) , and I want to have some fancy effect. On Wikipedia there are templates which sorta-kinda-do what I want - but this Wiki doesn't seem to have them. How can I determine which templates it actually has?
AI: Because templates are just normal pages with a specific type of content on them, there is no one set-in-stone way of finding a list of templates. However, the majority of MediaWiki sites will use a Template namespace for keeping templates together and easily implementable.
To get a list of all pages within a given namespace, go to Special:AllPages; at the top, select the namespace—Template, in this case—in the respective dropdown menu, then click the "Go" button (or hit your Enter/Return key). Do not enter anything into either text field. You may also want to check off "Hide redirects," as redirect pages do not have template content. |
H: Gmail is throwing emails from my academic address to spam
Today I sent an email from my Google Apps academic address to a friend of mine, and he said that didn't received nothing.
Then I send an email to my personal Gmail and noticed that it send it to spam. Why Google marked my academic email as spam? How can I reverse that?
AI: Gmail help shows the below instructions in how to handle this situation.
Find a message wrongly classified as spam, you can unmark the message. Just select the message, and click the Not Spam button that appears at the top and bottom of your current view. Unmarking a message will automatically move it to your inbox.
If you find that some senders' messages are consistently being mislabeled as spam, you can prevent this by:
Adding their email addresses to your Contacts list. Gmail will deliver messages from members of your Contacts list to your inbox, unless we know with high confidence that they are spam.
Some messages sent from contacts which are very clearly spam can be sent directly to your Spam label. More importantly, in some cases messages from contacts will not be sent to Spam but will be marked with a red warning banner if the content is suspicious - for example, your friend's or contact's account has been compromised and used to send phishing messages.
Creating a filter so the messages are never sent to Spam.
If you're sending to Gmail users and are seeing your messages marked as spam, please review our Bulk Senders guide.
https://support.google.com/mail/answer/9008?hl=en |
H: Is there a complete list of websites that can add a badge to a LinkedIn certificate?
Consider:
I know Code School and Coursera can do it:
How do I add a badge to my LinkedIn profile?
Add Coursera accomplishments to your LinkedIn Profile
Are there other websites/services?
AI: LinkedIn's Top 100 Certification Providers (based on the number of certifications in profiles). |
H: Only show important birthdays on Google Calendar
How can I manage the list people who show up on my calendar on their birthdays?
I also want each birthday reminder to show the age the person is turning that day.
Should I be using a different calendar?
AI: Google Calendar simply shows the birthdays of your Google Contacts. There is no way to restrict what people are displayed except by removing the birthday data from your Contacts.
(Of course, there's nothing stopping you from creating a calendar with just the birthdays of the important people you want to see. That's what I used to do before Calendar started reading from Contacts.)
Google also does not have an option to show the age someone is going to be with their birthday entry on your calendar.
You'll need to find another calendar to do that (if one exists). Finding such an app is beyond the ken of this site, however. |
H: Combine text from multiple cells into a single cell forming a sentence?
I would like to combine text from Cell A2, B2, C2-I2, J2, into a sentence in E2.
Same thing would continue down in Row 3, 4, 5, etc.
I would want the sentence to end up being "[A2] can be bought from [B2], by [C2-I2] after you do the quest: "[J2]"."
C2-I2 each cell may or may not have a name. If it has a name, it should be included with a comma. If not, it should be left out. I can add the comma in-cell if it makes it easier.
Here is an example
AI: This would work:
=A2&" can be bought from "&B2&" by: "&join(", ",filter(C2:I2,len(C2:I2)))&", after completing the quest """&J2&""""
The operator & is concatenation; its effect is identical to concatenate formula, but I find & easier to type.
join(", ",filter(C2:I2,len(C2:I2)))
takes only the nonempty cells in the range C2:I2 and joins them, separating by comma and space. I am assuming at least one cell in this range is nonempty, otherwise the sentence won't make much sense no matter what.
The contraption ..."""&J2&"""" at the end is escaping quote marks within a string. To be escaped, " must be repeated. So, """" is the string containing one character, namely ". |
H: How to limit a phrase search to official announcements?
How can I search a saying, or a quote (I mean, real quote) in Google? For example, I want to search for any statement from The Supreme Court that has this keyword: the fact that. Is it possible?
AI: To search for exact phrases, enclose them in quotes. For instance, this search seems to have returned some pretty good results:
united states supreme court "the fact that"
If you want to limit this to "official" pronouncements, you need to limit the site(s) searched using the site: operator.
So, to search that phrase on the official site for the U.S. Supreme Court, you'd use:
"the fact that" site:www.supremecourt.gov
You'll find a ton of useful information here: How to search on Google |
H: Conditional formatting with multiple criteria for a range of cells
I'm trying to use conditional formatting to highlight a cell if it's value is not empty, AND if it's value is not equal to -------.
I've tried every normal formula I use to check if a cell is empty or contains a specified string with no success, how do you do this with conditional formatting?
Edit: This is for a range of cells, not a single cell.
AI: Writing a formula that satisfies your criteria is a matter of breaking down what your criteria are and implementing corresponding Sheets functions.
You have established that the formatting should be applied only if a cell is not empty. The EQ function tests whether or not one value (such as a referenced cell's) is the same as another. Since we want to test against an empty cell, we will use "" (the empty string) in our EQ function. So EQ(A1,""). But you want it to return TRUE if the cell is NOT empty, so we will enclose this expression within the NOT function.
NOT(EQ(A1,""))
You also established that the formatting should be applied if the cell's value is not -------. Once again, we can use EQ for this. EQ(A1,"-------"). And again, we'll wrap it in the NOT function to meet your criterium.
NOT(EQ(A1,"-------"))
Finally, you want BOTH of these criteria to be met if the formatting is to be applied. So we'll use the AND function, inputting the two formulae we put together above as the arguments. Your final formula is:
=AND(NOT(EQ(A1,"")),NOT(EQ(A1,"-------")))
Make sure that, when you are creating your conditional formatting rule, you set the condition field to "Custom formula is," or it won't work.
ADDENDUM: Normal Human has offered an alternate formula that is both shorter and easier on the eyes than mine. It utilises logical operators in place of some of Sheets' logical functions and so is not quite as easy to follow without knowledge of these operators. The logic is exactly the same, however. (<> is the operator for "not equal to.")
=AND(A1<>"", A1<>"-------") |
H: Combining data from two columns to one (in separate rows - not comma separated) and removing blank lines
I have a Google Sheet which receives information from a google form.
I would like to collate some of this data in a separate sheet (within the same document). I would like the new sheet to combine data from 4 columns into 2 Columns since the columns contain the same kind of data which we'd like see as a list. I'd also like the blank column to be removed.
The idea being that any time a new entry is made into these fields from the google form- the list would be updated in the second sheet.
I've done an example with pictures below- so columns labelled New song set 1 and New song set 2 would be combined into a list of all new songs- with their corresponding 'first lines' next to them. The blanks would also be removed (as seen in the second picture). The order of the data isn't important.
Do you know how I can do this with formalas?
Example:
Form Data:
SECOND SHEET SORTED DATA:
AI: Since the order of data is not important, the following will do:
={filter(A1:B, len(A1:A)); filter(C1:D, len(C1:C))}
Explanation:
filter(A1:B, len(A1:A)) gets all A-B pairs with nonempty A entry
the second filter does the same for C-D
={ ... ; ... } is concatenation of two arrays, putting one below the other. (See using arrays in Google Sheets.)
You can also sort the results by some field, e.g., by the first one, song name:
=sort({filter(A1:B, len(A1:A)); filter(C1:D, len(C1:C))}, 1, true) |
H: Using a single cell with comma separated tags to tag a column of products
Cell E1 contents has product tags:
Sets,Cuff,Bra,Panty,Garterbelt,Costume,Blouse,Skirt,Pantyhose,Corset,Headwear,Lace,Crotchless,Thong,Negligee,French Maid,Nurse,Trunk,Jock,Brief,Boxer,Athletic,Mesh,Fishnet,Fencenet,Lowrise,Micro,G String,Thigh Highs,Suspender,Bow,Boyshort,Babydoll;Teddy,Lace,Tube Dress,Boob Tube,Chemise,Glitter,Leopard,Satin,Halter,Eyemask,Ruffle,Kimono,Schoolgirl,Bodysuit,Camisole,Cami,Bodystocking,Bustier,Gloves,Tap Shorts,Shiny,Split Crotch,Ribbon,Open Crotch,Stretch,Fingerless,Leather
Column D2:D has all the lingerie product titles like "Black Garterbelt and Suspender"
So the idea is to print in column E2:E comma separated tags that are in the product tile from column D
AI: Here's a formula that does this: the entry for E2 is shown but it can be dragged down.
=join(",", filter(split(E$1,","), regexmatch(D2, "(?i)\b" & split(E$1,",") & "\b")))
Explanation:
split(E$1,",") split the set of tags into an array
& "(?i)\b" & split(E$1,",") & "\b" turns each tag into a regular expression which means: match this string as a whole, case-insensitive.
regexmatch records True if the product name matched the tag, and False if no match.
filter filters the array of tags according to the output of regexmatch
join joins the filtered array into a comma-separated string. |
H: Make Google stop sending 'new sign in from ...' emails
I get at least two emails from Google every time I sign in to my account and I want it to stop.
I tried changing the notification settings in Gmail, but they're still coming and they're useless.
How can I stop this?
AI: Researching this I've seen others have this issue but no solution was presented. One "fix" would be to simply put a filter on your Gmail account that deletes any email that has the title of the email that is bothering you. It's not the perfect solution but it might do until you find something that is more palatable. |
H: Google spreadsheet query language, match using regex?
I have a query formula that looks into a table and pulls names for example:
A B
1 john, andrew blah
2 drew, mike blah
I want it to show me all of the rows that involve drew, the query formula is select where A contains 'drew'. Both rows would show up, because andrew contains drew, but if I use the formula select where A = 'drew', nothing would show up because it is looking for an exact match. What do I do here? I was thinking maybe regular expression would help, but how would I do it?
AI: To handle word boundaries, you need where A matches instead of where A contains. It allows the use of regular expressions such as .*\bdrew\b.*, meaning
containing the string "drew"
with word boundaries \b left and right of the string (i.e., the characters adjacent to it cannot be word characters)
with any other characters elsewhere in the string: .*
The last bullet item is needed because the logic of matches requires the entire content of A to match the given expression (unlike regexmatch function, which will attempt to match substrings).
So, in your case it would be
=query(A:B, "select * where A matches '.*\bdrew\b.*'")
or, if you want to also match "Drew" (case insensitive), then
=query(A:B, "select * where lower(A) matches '.*\bdrew\b.*'") |
H: Conditional formatting based on portion of text
Is there a better way to specify conditional formatting based on another cell? For example, I have specified a Custom formula as the following (which works):
=or($A:$A="bar foo", $A:$A="baz foo")
But I would really prefer to match a partial. Something like (this doesn't work):
=$A:$A*="foo"
AI: For partial string matches, use regexmatch, such as
=regexmatch($A:$A, "foo$")
to match any string ending with "foo".
Aside: I find it easier to enter conditional formatting rules as they apply to the single cell in the upper left corner. So my version would be =regexmatch($A1, "foo$"). If the formatting rule is applied, say, to the range C:F, then for E3 the formula would be automatically remapped to =regexmatch($A3, "foo$") |
H: Using regexreplace to surround numbers by parentheses
The data I'm starting with:
1 Hello
2 Just another 22 line
300 Yeah, the first step is to admit you need help
I want the "finished" version to look like:
(1) Hello
(2) Just another (22) line
(300) Yeah, the first step is to admit you need help
To recap: surround any numbers with parentheses.
I can identify the numbers easily in the REGEXREPLACE "find" section, with [0-9]+
I am completely lost in the replace section. How do I retain the matched string?
AI: If your text is in cell A1, then
=regexreplace(A1, "([0-9]+)", "($1)")
will do the job. The term you were looking for is capturing: the parentheses around [0-9]+ capture the matched substring, i.e., it gets recorded somewhere. In the substitution string, the commands $1, $2, ... can be used to refer to the 1st, 2nd, etc captured string.
So, the command says: find a string of consecutive digits (greedily, i.e., grab all consecutive ones), and replace it by the same string surrounded by parentheses. And being a global search-and-replace, regexreplace does the above to every matched substring. |
H: Rearranging Google form data in a new sheet
I am trying to use a form to create a list of jobs for our student employees, which exists as an editable Google sheet. The thought, being any of the staff could add jobs that need to be taken, by using the form, and students could view a sheet for any openings and put their names down for any they wanted.
Normally, I would just give them access to the results sheet.
However, there are 3 different categories of student employees, and some jobs may require any combination of numbers of students in each category. On the form I have a simple dropdown of amounts for each type: # Cat1, # cat 2, # cat3.
What I would like to do is actually create a new Row with all of the same data from the form (Date, Start time, End time, Job Type, Location), as many times as needed for each Category.
Example:
Date |**Category*|**Qty*| Start |End |Job Type |Location
10/10/15|Cat 3 |3 | 10:00 AM |11:00 AM |Set-up |Library
10/10/15|Cat 3 |3 | 10:00 AM |11:00 AM |Set-up |Library
10/10/15|Cat 3 |3 | 10:00 AM |11:00 AM |Set-up |Library
10/10/15|Cat 2 |1 | 10:00 AM |11:00 AM |Set-up |Library
10/10/15|Cat 1 |2 | 10:00 AM |11:00 AM |Set-up |Library
10/10/15|Cat 1 |2 | 10:00 AM |11:00 AM |Set-up |Library
I would then like to add a column for student name, in which they could add their name to a job they were taking.
I plan to execute a script that will then check each morning for any unfilled jobs for that day, and generate an email to the Staff notifying us of the vacancy.
So what would I need to do to generate this new output?
AI: Since you are going to be using a script anyway (for email generation), might as well use one for the rearrangement.
Here's a simplified example of form input data:
+---+------------+-------+---------------+-------+-------+-------+
| | A | B | C | D | E | F |
+---+------------+-------+---------------+-------+-------+-------+
| 1 | Date | Job | Details | cat 1 | cat 2 | cat 3 |
| 2 | 10/2/2015 | Job 1 | some details | 2 | 3 | 1 |
| 3 | 10/10/2015 | Job 2 | other details | 0 | 2 | 3 |
+---+------------+-------+---------------+-------+-------+-------+
This will be rearranged on another sheet, called "Job List" below, by this script (which can be triggered by form submission):
function processJobs() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var values = sheet.getDataRange().getValues();
var output = [];
for (var i = 1; i < values.length; i++) {
for (var j = 0; j < 3; j++) {
output = output.concat(repeat(values[i], values[0][j+3], values[i][j+3]));
}
}
outputSheet = ss.getSheetByName("Job List");
outputSheet.getRange(2, 1, output.length, output[0].length).setValues(output);
}
function repeat(row, category, quantity) {
var arr = [];
for (var i = 0; i < quantity; i++) {
arr.push([row[0], category, quantity].concat(row.slice(1,3)));
}
return arr;
}
Explanation: the line with values[i][j+3] refers to various category counts within the row; j+3 is set so that j=0,1,2 correspond to 3,4,5 zero-based column indices (which mean the columns D,E,F above). For each count, the function repeat is called, which produces the necessary number of repetitions.
The function repeat inserts the date, category name, quantity of workers for that category (not sure why, but you wanted it), and the rest of the job description.
The whole thing is then recorded in sheet "Job List", like so:
+----+------------+----------+----------+-------+---------------+
| | A | B | C | D | E |
+----+------------+----------+----------+-------+---------------+
| 1 | Date | Category | Quantity | Job | Details |
| 2 | 10/2/2015 | cat 1 | 2 | Job 1 | some details |
| 3 | 10/2/2015 | cat 1 | 2 | Job 1 | some details |
| 4 | 10/2/2015 | cat 2 | 3 | Job 1 | some details |
| 5 | 10/2/2015 | cat 2 | 3 | Job 1 | some details |
| 6 | 10/2/2015 | cat 2 | 3 | Job 1 | some details |
| 7 | 10/2/2015 | cat 3 | 1 | Job 1 | some details |
| 8 | 10/10/2015 | cat 2 | 2 | Job 2 | other details |
| 9 | 10/10/2015 | cat 2 | 2 | Job 2 | other details |
| 10 | 10/10/2015 | cat 3 | 3 | Job 2 | other details |
| 11 | 10/10/2015 | cat 3 | 3 | Job 2 | other details |
| 12 | 10/10/2015 | cat 3 | 3 | Job 2 | other details |
+----+------------+----------+----------+-------+---------------+
Column F can be used for student names. |
H: Re-open submitted form
I'm trying to determine if Cognito Forms would work for my use case. We manage small scientific datasets and require researchers to provide metadata for these datasets. The capabilities of Cognito Forms looks like it'll cover everything, except one particular about managing entries.
We'd like to be able to have somebody be able to re-edit a form that's already been submitted previously, maybe even 6 months to a year later. What I'd like to be able to do is "re-open" that submitted form and allow someone to be able to go in and make changes or additions.
I've read about save and resume, but what I'm really looking for is the ability to re-open a completed form for editing or additions by somebody, ideally by just sending them a link to the previously filled out form.
Is this something that is/will be/never will be supported by Cognito Forms?
AI: We are adding support for sharing entries to Cognito Forms in the next week or so. This will definitely accomplish your goals. You will be able to send out links that allow editing of submitted entries or kick them back to incomplete to allow them to be "resubmitted". |
H: What to do about an unrecognized sign-in on my Google account
Yesterday I got an alert from Google (New sign-in alert) that someone used my password. It says a Galaxy Note 2 with an IP 106.77.169.192 signed in.
What can I do about this other than change my password (which I have done)?
AI: You did the right thing, if you don't know who logged in then changing your password is the best thing to do. Make sure you have a secure password, containing upper and lowercase letters and numbers and special characters, never use a name or word that's in a dictionary. |
H: How do I conditionally format a cell based on a date within a string of text?
Suppose today is 13 October 2015. I want to apply conditional formatting rules to four cells in Google Sheets:
Cell 1:
10/22 Remove cat from bookcase
Cell 2:
10/23 Put books back
Cell 3:
10/24 Repair bookcase, 11/2 Send cat to vet
Cell 4:
12/6 Sell cat
Cell 1 should be formatted one way ([first] date is before today), Cell 2 should be formatted a second way ([first] date is today), Cell 3 should be formatted a third way (first date is tomorrow) and Cell 4 ([first] date is not within the last week, today nor tomorrow).
How do I do this?
AI: The command
=datevalue(regexextract(A1, "[0-9]{1,2}/[0-9]{1,2}"))
extracts the first date-looking part from a string and interprets it as a date (if this is possible according to the current locale's convention; "13/2 buy a dog" will throw an error).
You can then set multiple rules with custom formulas involving the comparison of the above with today():
Before today:
=datevalue(regexextract(A1, "[0-9]{1,2}/[0-9]{1,2}")) < today()
Today:
=datevalue(regexextract(A1, "[0-9]{1,2}/[0-9]{1,2}")) = today()
Tomorrow:
=datevalue(regexextract(A1, "[0-9]{1,2}/[0-9]{1,2}")) = today()+1
Not within last week, today or tomorrow:
=or(datevalue(regexextract(A1, "[0-9]{1,2}/[0-9]{1,2}")) < today()-7, datevalue(regexextract(A1, "[0-9]{1,2}/[0-9]{1,2}")) > today()+1) |
H: How to turn a month string into a month int in Google Spreadhseets
I am trying to take the name of a month, such as October and turn that into the corresponding number for that month 10. Past making a long formula that checks for each month by string, and without using apps script to create a custom function (not reliable enough).
How would I do this?
AI: If cell A1 contains the name of the month, then the command
=month(datevalue(A1&" 1"))
returns the number of the month. It appends a day to the month (1), so that datevalue can parse the date; then month returns the month number. |
H: Where can I view a list of Facebook apps to install from?
I do not use Facebook very much but I remeber reading some documentation a long time ago about Facebook apps being available by third-party developers.
Where do I view the list and how can I browse and install some of these (just like Android and iPhone users can download and install apps from the respective play store or equivalent)??
AI: Facebook currently lists games this way
Point your browser to https://www.facebook.com/games/
From there you should be able to search for other apps as well and send it to mobile to install. |
H: Uploading a Google Doc to Google Drive makes file unreadable on Drive website
I have files in my computer (Mac OSX 10.10) that were originally created on Google Drive. For example, testing123.gdoc. The file is in my computer because I had it synced with Google Drive via the Google Drive app. It even has the appropriate icon for a Google Doc.
I've since uninstalled the app and deleted the file from Google Drive, but still have testing123.gdoc in my computer.
On my browser, I navigated to my Google Drive account and uploaded testing123.gdoc successfully.
I does upload, but shows a generic icon, and it will not open in Google Docs when double clicked. I'm offered some 3rd party apps to open the file.
Why is this happening? This issue also occurs with .gsheet files.
AI: .gdoc and .gsheet files are actually Internet shortcuts (e.g. .url) pointing to the URLs of Google Docs and Google Sheets created in the Docs editors. They are not the actual documents and spreadsheets to which they are linked. So when you uploaded them to your Google Drive, you actually uploaded Internet shortcuts.
If you did, in fact, completely delete—sent to Trash then permanently deleted your Trash's contents—the corresponding Docs/Sheets in the Drive webapp, then they do not exist anymore, since the .gdoc/.gsheet files just point to URLs that no longer exist. If they are still in your Trash, you can restore them to your Drive.
tl;dr Basically, you don't have the actual testing123 Google Doc on your Mac; you have a shortcut to it. |
H: How can I include & in Disqus comments?
I followed an example on a tutorial to create Spring MyBatis example. I got an error following the instructions in the document. However, I have solved my issue on a tutorial I followed to create an application and I want to post how I solved it. It was using & instead of & text which solved the issue for me.
I want the ampersand to be included in the comment section as like, &. But after posting the comments it displays, the & instead of &. I've tried to include it inside the <code></code> block and also tried to wrap it around with the <pre><code></code></pre> block but it doesn't work.
So how can I post the code block comment to display the & string?
AI: You need to (manually) HTML entity encode the HTML entity in order to display a literal HTML entity! In other words:
&amp;
In fact, you need to manually HTML entity encode most HTML if you want to display the literal HTML in the comment, since Disqus allows you to use several HTML tags in order to format your comments. |
H: Filter a range by both Row and Column criteria in Google Spreadsheets
I have a set of data that I want to filter by both the rows and columns.
I want to create a function like FILTER(B4:L8, (B2:L2 = "Email")+(B2:L2 = "All"), A4:A8 = "Email") to filter the data in the image below. However this does not work, how would I go about this?
Example Google Doc: https://docs.google.com/spreadsheets/d/1JIGXmOKkb_llfnrfJmdbiwFG97tiL3E3PnDuhy3r9x8/edit?usp=sharing
AI: As filter command documentation says,
In order to filter both rows and columns, use the return value of one FILTER function as range in another.
Like so:
=filter(filter(A4:L8, (A2:L2="Email")+(A2:L2="All")), A4:A8="Email") |
H: Easy way to receive Gmail inbox activity summary at a different email address?
I'm currently switching email providers.
Is there an easy way to get a weekly summary at my new email of activity in my old Gmail inbox so I don't miss anything important during this transition period?
I don't want to forward my email, I just want a summary so I can go take care of it in Gmail, either by unsubscribing or changing where emails of that type are being sent.
AI: IFTTT can monitor your Gmail inbox and create digests or forward select emails.
Unroll.Me would help you summarize your inbox, but you'd have to combine it with IFTTT or forward the summaries to get them in your other inbox. |
H: Does Facebook use any other CDN apart from Akamai? Encountered fbcdn.net subdomain that does not belong to Akamai
I received a notice from my third-party firewall application (Little Snitch) that when I had Facebook open, my browser (Chrome 46.0.2490.80 on El Capitan 10.11.1) was attempting to connect to "scontent.fper1-1.fna.fbcdn.net" and "scontent.fmel1-1.fna.fbcdn.net". Having never seen these particular variations on the fbcdn domain before despite daily use of Facebook and having used LS for a while, it was a little suspicious to me.
Looking up the IP addresses (150.101.84.17 and 150.101.84.145 respectively) point to Internode, an ISP located in Adelaide, Australia (I live in Australia, but not Adelaide) and AFAIK, Facebook does not use their CDN and I don't think Internode even provides such services.
But the domain is fbcdn.net. right? And if that's so, which is legit domain used by Facebook for content/cookies etc, even if the IP addresses don't resolve to Facebook or Akamai, it should be fine? Nothing suspicious?
AI: A google search should show that scontent.fper1-1.fna.fbcdn.net type URLS are associated with Facebook photos
https://www.google.com/?q="scontent.fper1-1.fna.fbcdn.net"
https://www.pinterest.com/source/scontent.fper1-1.fna.fbcdn.net/
https://www.eff.org/https-everywhere/atlas/domains/fbcdn.net.html
You can also check the cert information in your browser
There are quite more than a few variations under fbcdn.net
In the end there isn't a way to say for sure without brute force listing the IPs for Facebook to compare, but in general most if not all subdomains under fbcdn.net should be safe. Facebook probably just routed you to the best server for your conditions at that point in time.
If you think otherwise you can always send a report to https://facebook.com/whitehat/report |
H: Conditional formatting a range based on the value of a single cell inside of it
I'm trying to format a range based on the value of a single cell inside.
So if I have a range like in this image:
I am coloring based on the teams. If I was to rearrange the teams, how can I use conditional formatting to maintain the colors? Without having a set of conditional formatting formulas for each and every cell?
AI: Unfortunately, you will need a conditional formatting rule for each team (not cell, though), as you can only set one fill color per rule. Assuming you want to format based on the value of an entire cell rather than a substring, then in each of your rules, set the condition to "Custom formula is…" and then enter =($B1="Team 1") (replacing "Team 1" with the value you wish to color with a given rule).
Make sure you include the equals sign at the beginning, as that tells Sheets that you are entering a formula. Also be sure to include the dollar sign ($) before the letter of the column of teams—I assumed it is column B based on your image—so that it only looks at the value in that column when determining whether or not to apply the formatting. (Using the dollar sign there turns it into an absolute column reference.) |
H: Google Drive: Do editors, viewers receive a notification when authority removed?
I'm going in and tidying up some permissions on Google documents I've created, mainly removing editors and viewers before archiving some documents.
Do the readers and viewers I remove received a notification that they have been "unfriended" from the document?
AI: No, unless they still have the document open in a tab. If it is open then they will get a notification that says that their permission settings have changed and it forces them to reload. If it is closed then they won't see it unless they go looking for that particular document and can't find it. |
H: Adding a overbar/overline on a single letter or obtaining "x bar"?
Using Google Docs, I need an X with a line on top, the equivalent to latex \bar{x} and what statisticians call "x bar". I was using an equation field and \overline but it adds the line over the entire equation. Is there a way to do this?
x̄
AI: Under the "math operations" button on the equation bar, there's the symbol you are looking for. |
H: How to post to Twitter and Facebook business page without notifications
I have a company website with a running blog. I created a business pages on Twitter and Facebook a while back but didn't had time to keep them up to date until I've finally created website. Now that I have website I have also 20+ blog posts I would like to post to Twitter and Facebook so that experience is similar (same information on website, Twitter, Facebook). I've plugins which will essentially publish the posts to Twitter and Facebook on demand. However I don't want to flood both Facebook/Twitter with posts
Is there a way to do this in a way so that people won't get notifications on Twitter and Facebook but if they would get into the page they would see those posts? I was thinking to disable Facebook page for a moment, post things, and re-enable. Not sure if it will work though? Is there some way to do this on Twitter? Preferably I would want to post those posts with "older" dates as well so that it's similar experience. What's the preferred way to go?
AI: Manually share one post per day or week for the next few weeks.
I don't think that there is any way you can manipulate the post-date on either Facebook or Twitter. But there, it is not frowned upon to re-promote things that you originally shared on your blog some time ago. |
H: How do I modify this Google script to pull the email from column E in the Google sheet?
Instead of assigning one static email to the "var email" below (or for that matter multiple emails separated by commas), my question is how do I enter the column E value from the Google Sheet this script is pulling from? Column E contains an email value that varies depending on who is using the form, and we need the script to send to that address specifically each time it is filled out.
Any suggestions would be very helpful. I found similar and related posts, but nothing exactly like this. I also posted in Stack Overflow as I was unsure where this should be housed.
function sendFormByEmail(e)
{
// Enter email address for form respondent below.
var email = “example@quest.com";
var s = SpreadsheetApp.getActiveSheet();
var headers = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
var message = "";
var subject = "Instructional Rounds: ";
AI: You could use a for loop and iterate down Column E, which is column 5.
Then insert the cell values into an array.
var data = s.getDataRange().getValues();
//var data = s.getRange(1,5,s.getLastRow(),1).getValues();
var emails = [];
for (var row in data) {
var cell_value = data[row][5];
emails.push(cell_value);
}
for (var e in emails) {
// TODO: Perform operations on emails[]
} |
H: Why can't I refer to another cell with the value comparator field?
This is more a curiosity question than a fix to a problem, because I found a few ways to fix it already.
From what I could gather, if I want to apply a conditional formatting based on the value of another cell, I have to use a custom formula. However, in the list, there are a couple options that would seem to be much more relevant: "Greater than (or equal to)", "Lesser than (or equal to)", "Is (not) equal to", "Is (not) between". But I'm starting to think that they are not so useful.
Here I have a column of numbers ranging from 10 to 30; I want to highlight them in green if they're greater than or equal to a number (20) set in another cell. From a few other questions here and on SO, it would seem that I should use a custom formula as something like =K7>=K4, but instead I still wanted to try the options in the list that seemed more intuitive.
As you can see though, it does some weird things, where it consider 11 to be under 20 (which is true AFAIK), but everything else above 11 is either equal or greater than 20.
My guess is that putting =K4 in the "Value or formula" field didn't quite link to the actual K4 cell, but I can't figure out why it does what it does here.
If I put "20" in the field, it highlights the right cells (but it's not dynamic anymore).
Edit: putting =K$4 works like a charm. Quite literally, in this case.
AI: You identified and solved the issue correctly: =K4 is a relative reference, so when it is applied to the range K7:K26, the following happens:
K7 (being the upper left corner of the range) gets compared to K4, as stated in the formula
K8 (one cell down) gets compared to K5 (one cell down)
K9 (two cells down) gets compared to K6 (two cell down), and so on.
If this sort of comparison is not what you want, then the absolute reference =K$4 should be used.
Note that the above logic applies equally well to custom formula formatting, and to "greater than", "less than", etc. |
H: Is there a way to link to a Netflix movie at specific time?
Is there a way to link to a Netflix movie at a specific time, similar to how you can link to a Youtube video at a specific time?
AI: With the HTML5 player, which Netflix serves on many browsers1, it appears that adding a t parameter in seconds will seek to it. For example, to skip to 5 minutes, add &t=300 at the end of the current URL. Change the ampersand (&) to a question mark (?) if the URL doesn't currently have parameters.
For example,
https://www.netflix.com/watch/70302157
becomes
https://www.netflix.com/watch/70302157?t=300
but
https://www.netflix.com/watch/70302157?trackId=something&tctx=something
should be
https://www.netflix.com/watch/70302157?trackId=something&tctx=something&t=300
This seems to be an undocumented feature and could probably change or be removed at any time.
1As of December 2015, Firefox 43 64-bit on Windows gets the HTML5 player. |
H: Removing certain files from Drive folder based on name
I have about 600 photos in a shared Drive folder. However, my camera uploaded both the ".RW2" files and the ".JPG" files, so I have a double of each photo. I want to delete all of the .RW2 files in the folder, but can't seem to find a way to do it without removing each file individually. Is there some sort of automated process I can use to do so?
AI: One could write a script for this, but with 600 files, it seems easier to use the interface:
Search for .RW2 using the search bar on top of screen:
Scroll down in the list of search result so that it loads more... and more... and more...
Press Ctrl-A or its Mac equivalent to select all these items.
Click on the trash icon to move them to trash.
Step 2 can be slightly annoying with many files. Drive uses infinite-scroll layout instead of fixed-size pagination of Gmail. It also lacks Gmail's capability to select all search results, even those not shown on the page. But still, the process is manageable and takes less time than writing an Apps Script and then worrying about whether it deleted the right things. |
H: Change PayPal address from Canadian to USA
I just moved from Canada to US and want to add my USA address and credit card with US billing address to PayPal, but not able to do this. I read this discussion from 2011, and it looks like I need to open new PayPal account.
Is it only way to do this?
I prefer to use the same account with Canadian and US credits card on it.
AI: As a general rule, PayPal does not allow to change address when you move from one country to another:
Due to banking regulations, you can not change your address to a
country that is different from the country you used when you opened
your account. If you're moving abroad, you’ll need to close your
existing account and open a new account. If you maintain residences in
2 countries, you can have 2 PayPal accounts as long as only one is a
Premier or Business account.
Original Link |
H: Querying data through importHTML function in Google spreadsheet
I am trying to import table data into a Google spreadsheet using the below function:
=ImportHTML( "http://eciresults.nic.in/StatewiseU05.htm" , "table" , 9 )
Following is the result I get out of it.
But I didn’t want the content in row 1,2,3 & 4 to be displayed so I tried the query as following and got the below result:
=QUERY(ImportHTML( "http://eciresults.nic.in/StatewiseU05.htm" , "table" , 9 ), "SELECT * OFFSET 0")
But I’m still getting the NCT of Delhi content in row 1. How can I get rid of that and show only row 2 and onwards that contains the area name and subsequent data?
AI: I got it to work with this:
=QUERY(ImportHTML( "http://eciresults.nic.in/StatewiseU05.htm" , "table" , 9 ), "SELECT * where Col2>0",0) |
H: Conditional formatting rule to apply to across row
I have set a conditional rule so that if a specific cell equals "y" then the cell background is changed to green.
Is there a way to apply this rule so that it will change the background colour for the row the cell is on?
AI: Pretty much.
Assuming the value is in column A.
Format>Conditional Formatting
Enter A:J under Apply to Range (or extend beyond J if you need to)
Format cells if Custom formula =$A:$A="y"
That'll get you this example. |
H: Send selected cells from a row via email
I am starting with Google Scripts and I was hoping to create a sheet that could email selected cells from a row. What I want to do by selecting Send Email at the end of a row it then selects pre defined cells on the said row and then emails it. I created something in VBA for Excel that does the same trick as shown below.
I am essentially trying to replicate what I have done below using Google Sheets if possible to do via Scripts. Any advice would be much appreciated.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Long
If Target.Count = 1 Then
If Target.Value = "Send Email" Then
r = Target.Row
With CreateObject("Outlook.Application").CreateItem(0)
.Subject = Cells(r, 5).Text
.Body = "============" & vbNewLine & Cells(r, 7).Text & vbNewLine & "============" & vbNewLine & Cells(r, 6).Text
.To = Cells(r, 4).Text
.SentOnBehalfOfName = "7828691"
.Display
End With
End If
End Sub
I have also attached my Google sheet so far to show an example.
Here is my Google Sheet so far
AI: While it's possible to insert a button (Insert > Drawing) and assign a script to it, the resulting buttons float over the sheet in their own layer, not being bound to any cell. This wouldn't work for you since you want the action to be related to a particular row of the sheet.
Instead, I would use a custom item of the main menu, added by the function onOpen below, every time the spreadsheet is open (so, after entering the script you'll need to close and open the spreadsheet for it to appear). The menu command "send email" sends email using the data from the active row (the one where the cursor is now). It doesn't matter where in the row the cursor is.
Otherwise the logic is pretty straightforward: get the handle of the active sheet, get the number of the active row, get values in the active row, use them to compose an email.
function sendEmail() {
var sheet = SpreadsheetApp.getActiveSheet();
var row = SpreadsheetApp.getActiveRange().getRow();
var values = sheet.getRange(row, 1, 1, 10).getValues(); // or how many columns you want from that row; 10 seem to be enough for your data
var recipient = values[0][2]; // indices of JavaScript are 0-based.
var subject = values[0][3]; // 0th row of the acquired range, 3rd column
var body = values[0][6] + '\n========\n' + values[0][4];
MailApp.sendEmail(recipient, subject, body);
}
function onOpen() {
var menu = [{name: "Send Email", functionName: "sendEmail"}];
SpreadsheetApp.getActiveSpreadsheet().addMenu("Custom", menu);
}
You can add options with
var options = {cc: 'someemail@gmail.com', replyTo: 'another@gmail.com'};
or
var options = {cc: values[0][7], replyTo: values[0][8]};
if you take them from the spreadsheet. Then the sending command will be
MailApp.sendEmail(recipient, subject, body, options); |
H: How can I filter phishing emails based on a pattern
Recently I started to get automatic emails, generated by some scammer. It either says that my Google account will be blocked soon or some stranger has left me a message. To read the message I must open a link.
I opened a couple of such links though anonymous proxy: these were fake Gmail login forms. So, he wants to steal my Gmail account. The links have very similar domains:
imaill.kiev.ua
imaill.ws
imaill.vn.ua
imaill.te.ua
imaill.ternopil.ua
Is it possible to create a filter in Gmail such that when it sees "imaill\.*" in the text representation of the email, it deletes it?
AI: A filter on "imaill." will probably suffice, assuming that you don't have legitimate messages with that string. (Like, communication from your ISP responding to your phishing report.)
Matches: "imaill."
Do this: Mark as read, Delete it
That's probably a bit too broad, though. Google's Advanced Search operators for Gmail are a little light on the headers they can key on, allowing only searches (and thus filters) for:
from
to
cc
bcc
rfc822msgid
delivered-to
So, depending on what this interloper is doing, this might work better:
Matches: from:imaill.
Do this: Mark as read, Delete it
As I mentioned in my comment, though, the best course of action is probably to mark the messages you're receiving as phishing attempts.
This lets Google get better at recognizing phishing attempts and, eventually, prevent these sorts of messages from reaching your (and everyone else's) mailbox. If you just filter these into the trash that won't happen. |
H: "sort" function results in all of my data going to the bottom of the sheet
I am trying to use a form to create a list of jobs for our student employees, which exists as an editable Google sheet. I would like to be able to have any staff member add jobs that need to be taken, by using the form, and students could view a sheet for any openings and put their names down for any they wanted.
With help from this site, and some modifications, I have a system that works to place the info from the forms into a list. Where my problems start coming in, is I want to be able to order the sheet by status and then by date.
Here is the previous thread.
Essentially, the form gathers the following data :
+---+------------+-------+-------+-----+---------+-------+----------+------+--------+--------+--------+
| | A | B | C | D | E | F | G | H | I | J | K |
+---+------------+-------+-------+-----+---------+-------+----------+------+--------+--------+--------+
| 1 | Timestamp | Date | Start | End | service | Event | Building | Room | #Cat 1 | #Cat 2 | #Cat 3 |
Timestamp|Date|Start Time|End Time|Service|Event|Building|Room|#Category 1|#Category 2|#Category 3|
Where that Categories are different classifications of worker, with a quantity for each. Upon running the following script, the data goes into a second sheet: "Job List" with the following fields:
+---+-----------+-------+----------+-------+-----+---------+-------+----------+------+-------+--------+----------+
| | A | B | C | D | E | F | G | H | I | J | K | L |
+---+-----------+-------+----------+-------+-----+---------+-------+----------+------+-------+--------+----------+
| 1 | Techname | Date | Category | Start | End | service | Event | Building | Room | Notes | Status | DateSort |
Tech name (where students manually add their name if they want a job)|Date|Type|Start|End|Service|Event|Building|Room|Notes|Status*|DATESORT**|
*Status is an array formula in Cell K1, which auto populates the column as "filled" "unfilled" or "urgent" using the formula
=ARRAYFORMULA(If(Row(A1:A)=1,"STATUS",IF(B1:B,If(ISBLANK(A1:A),If(NOT(ISBLANK(B1:B)),IF(B1:B=TODAY(),"Urgent","Unfilled"),""),"Filled"),"")))
**DateSort is in L1 and simply coverts the date to a value:
=ARRAYFORMULA(If(Row(A1:A)=1,"DATESort",IF(ISBLANK(B1:B),"",DATEVALUE(B1:B))))
Here is my script:
function processJobs() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var values = sheet.getDataRange().getValues();
var output = [];
for (var i = 1; i < values.length; i++) {
for (var j = 0; j < 11; j++) {
output = output.concat(repeat(values[i], values[0][j+9], values[i][j+9]));
}
}
outputSheet = ss.getSheetByName("Job List");
outputSheet.getRange(2, 2, output.length, output[0].length).setValues(output);
//runs function to order sheets by Status then date (as datevaule)
OrderSheet();
}
// Adds as many duplicate rows as needed for each job type
function repeat(row, category, quantity) {
var arr = [];
for (var i = 0; i < quantity; i++) {
arr.push([row[1], category].concat(row.slice(2,8)));
}
return arr
}
// Invoked to order the "Job List" from earliest to latest by date of shift
function OrderSheet() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var JobList = ss.getSheetByName("Job List");
var data = JobList.getDataRange();
data.sort([10,11]);
You will notice that I have a separate line for each person that would need to be on a shift, so if category 3 needed three people, there would be 3 different identical rows. The sheet works fine up until the sort. The rows are in fact sorted (first by status and then by date), however they are all moved to the bottom of the sheet (row1001 and up). I also notice that if there were student names entered in the "name" column, these values get erased when the script runs.
Any suggestions on rectifying these issues? I think that it may have something to do with the array formulae, that is causing all rows to be seen as having data.
Ultimately, when this is finished, I hope to add a script that will check the sheet every morning, and if a status is "Urgent" (meaning it is unfilled as of the day of the assignment), an email will be sent out to alert us of the vacancy.
AI: Cells containing the empty string "" appear empty but are not (isblank returns FALSE for them). They get sorted ahead of nonempty strings, which is not what you want. To avoid this, replace
if(isblank(B1:B), "", datevalue(B1:B))
by the simpler
iferror(datevalue(B1:B))
The command iferror returns its (optional) second argument if there is an error evaluating the first argument; otherwise it leaves the cell blank. Blank cells are sorted to the bottom.
A potential drawback of the above is that misformatted dates are simply ignored, while you may want to see and fix them. This is something you can address separately; e.g., have a column with
if(isblank(B1:B), 0, if(iserror(datevalue(B1:B), 1, 0))
and sum over it to get the total number of nonempty but invalid date cells.
Another potential issue is that you are sorting a range containing arrayformula. The sort may move the formula to another row, creating a mess. It's safer to exclude the header row from sorting. Replacing
var data = JobList.getDataRange();
by
var data = JobList.getDataRange().offset(1,0);
would do it. |
H: Google Sheets not sum numbers correctly
I have a sheet with many numbers generally in range 1.5-0.5 with lots of decimal places, however google sheets isn't doing sum on them correctly it returns 0.
I need all the decimal places so I can't round or anything.
AI: I believe the data in columns B:E are formatted as text rather than numbers.
In Google Sheets you'd select those cells and choose Format>Number>Number.
See the example here. |
H: Auto calculate and display timestamp in a specific row and column
I have a spreadsheet with a formula that works to display the timestamp in the same row, but is there a way to set a column at the same time so I don't have multiple time stamps displaying along that row if I update a different column? I'm not too familiar with code so it may be an easy fix.
function onEdit() {
var s = SpreadsheetApp.getActiveSheet(); // Get spreadsheet name
var r = s.getActiveCell(); // store active cell name in current spreadsheet
var cell1 = 26 // This is the row I want to put values
if(r.getRow() != cell1) { // Ignores this row (where I put the dates)
var column = r.getColumn(); // Get column # from active cell
var time = new Date(); // Get date and time of last mod
time = Utilities.formatDate(time, "GMT-5:00", "MM/dd/yy, hh:mm"); // Format date and time
SpreadsheetApp.getActiveSheet().getRange(cell1,column).setValue(time); // put in time in cell
};
};
AI: At present you have
var column = r.getColumn(); // Get column # from active cell
which means the timestamp gets entered in the column that you edited. If you want to have a single timestamp instead, put
var column = 1; // timestamp goes to Column A every time
or some other number instead of 1. |
H: How to use just Nickname instead of Full name on G+?
I'm following these Desktop steps to add the nickname for my G+ profile, however I'm not able to use my nickname to display on comments.
For example going to some Chrome web store and posting the comment using my Google account, I would like to see my nickname instead of full name.
Is it possible?
AI: Presumably by using the "Display name as..." option where you create the nickname.
Unfortunately, Google doesn't give you that option. If you give yourself a nickname, you can display your name as
John Doe
John "Johnny Five" Doe
John Doe (Johnny Five)
There is no option to just display "Johnny Five".
The other option is to change your actual display name, but that may be impractical for a couple of reasons. |
H: Manually block quote in Google Inbox
Is there a way to manually format a section of my email in Google Inbox as a block quote? I don't see the option in the Inbox UI.
AI: It would appear to be not possible with Inbox as it currently exists. Bold, italic, underline, bulleted list, numbered list, are your formatting options. Simply selecting text and then pressing some format button is not an option (although it is in Gmail proper).
It's possible that pasting from somewhere else might give you an indent that would be preserved, but I wouldn't count on it. Another option is likely to be Templates.
For what it's worth, the Gmail keyboard shortcuts for bold, italic, bullet list, etc., seem to work, but Ctrl+] doesn't indent in Inbox. (It doesn't seem to do anything.)
Since the product is still in preview mode, be sure to use the "Feedback" feature to let Google know that they're missing this feature. |
H: How to specify a target at WikiMiniAtlas
I want to link to a particular location with the map of Wikimedia pictures at https://wma.wmflabs.org/
This map has a Center on target button, so I guess there is a way to specify a target latitude/longitude via the URL.
What is this webapp's URL syntax for specifying a latitude/longitude?
AI: Here is the URL pattern:
https://wma.wmflabs.org/iframe.html?wma=
<latitude>_<longitude>_<width>_<height>_commons_<zoomlevel>_<language>
&globe=Earth&lang=<language>
<width> and <height> seem to have no effect.
Example around the White House:
https://wma.wmflabs.org/iframe.html?wma=38.8977_-77.0365_700_500_commons_14_en&globe=Earth&lang=en |
H: Google spreadsheet: Show 2 formulas or more in a cell
I just want to know if there's any way to show 2 or more formula values in the same cell.
P.E.
=ARRAYFORMULA(A1+A2)
=ARRAYFORMULA(B1+B2)
=ARRAYFORMULA(C1+C2)
Reason: I want to make a center-flooding dashboard with 2 columns by merging cells and using ctrl+enter
AI: You can only have one formula per cell, but that formula can consist of different 'parts' that can be joined together. Maybe this formula
=A1+A2&char(10)&B1+B2&char(10)&C1+C2
will output what you try to achieve with your present example? |
H: Suppress notification about one new video
Whenever I publish a new public video in my channel, then all the subscribers get a notification.
So far that's good, however, there is one video which I would prefer to "silently" put online.
So, is it possible to suppress such a notification for one single video ?
AI: On upload go to advanced features and distribution options uncheck the box that says notify subscribers. |
H: Is there a way to see all of the Google Photos Creations?
The Google Photos Creations used to be grouped under Auto Awesome. Since the re-branding, Auto Awesome doesn't exist anymore. Is there way to see these things without manually going through all of the photos or albums?
AI: To see the Creations you've saved...
Go to the "Search" page
Scroll to the bottom and click "Creations"
To see the Creations the Assistant has suggested, but which you didn't save...
Go to the "Assistant" page
Scroll to the bottom and click "VIEW UNSAVED CREATIONS"
(I don't know if this latter holds on to Creations that you've explicitly dismissed/deleted.) |
H: How to create multiple columns from one single column?
I've got information that I gather from emails, from where I just take the lines, pass them through a filter and drop them into a Google Spreadsheet sheet.
It ends up looking like this:
Element 1: Value 1.1
Element 2: Value 1.2
Element 3: Value 1.3
Element 1: Value 2.1
Element 2: Value 2.2
Element 3: Value 2.3
...
If I know that these are always going to be 3 values, and then it repeats over and over, is it possible for me to transpose that list only to 3 columns?
My goal is to end up with:
Element 1 | Element 2 | Element 3
----------+-----------+----------
Value 1.1 | Value 1.2 | Value 1.3
Value 2.1 | Value 2.2 | Value 2.3
AI: First, I'd split the data from column A into two columns. In this case it looks like the length is consistent so it makes it easier (I can demo the other if need be).
Get the left chunk with =left(A2,11)
Get the right chunk with =right(A2,10)
Now you have Element 1: | Value 1.1
To flip the unique elements use =transpose(unique(B2:B7))
Now you have Element 1: | Element 2: | Element 3:
Finally, you can filter the returned data using =FILTER( C:C , B:B = E1 )
The working example is here. |
H: Aggregate strings
Can Google Sheets queries aggregate strings?
I want to aggregate all locations for all years, so the following:
year location
2013 Sudan
2014 Syria
2012 India
2014 Poland
2014 Great Britain
Should be transformed to:
year locations
2012 India
2013 Sudan
2014 Syria, Poland, Great Britain
The problem is that =QUERY(select year, sum(location) group by year) does not work, neither does =QUERY(select year, concatenate(location) group by year).
AI: No, the aggregation functions available for query do not include concatenation of strings.
An alternative approach, illustrated by the following example:
+---+------+---------------+------+------------------------------+
| | A | B | C | D |
+---+------+---------------+------+------------------------------+
| 1 | year | location | year | locations |
| 2 | 2013 | Sudan | 2012 | India |
| 3 | 2014 | Syria | 2013 | Sudan |
| 4 | 2012 | India | 2014 | Syria, Poland, Great Britain |
| 5 | 2014 | Poland | | |
| 6 | 2014 | Great Britain | | |
+---+------+---------------+------+------------------------------+
C2 =sort(unique(A2:A))
returns sorted list without repetitions
D2 =if(C2="", , join(", ", filter(B$2:B, A$2:A=C2)))
picks the countries for the given year and joins them into a comma-separated string
The formula from D2 needs to be dragged/copied down the column; I couldn't come up with an arrayformula variant for it. |
H: Is there a way to dynamically populate a dropdown depending on the value of other cells?
Is there a way to populate a dropdown list differently depending on the values of another cell? For example, the dropdown in A2 contains Movies and Sports. I want the dropdown in A3 to have Horror and Romance in its dropdown selection if I select Movies in A2 and Baseball and Basketball if I select Sports
How can I achieve this?
AI: You could make the second validation list an if/then statement dependent on the answer to the first one.
=if(A1="Movies","Horror","Baseball")
=if(A1="Movies","Romance","Basketball")
An example is here. |
H: Is there a way to disable a cell from allowing input if another cell has data in it?
I'm basically trying to create a simple form on Google Sheets. I'd like to make it so that if a user inputs X into A2, then A3 will be disabled, otherwise A3 is open for input.
Is there a simple way to implement this? I'm currently just using conditional formatting to black out cells in an attempt to stray people from putting stuff in there, but it seems like a rather poor implementation if there's a way to actually disable a cell.
AI: Apply to A3 data validation rule with the custom formula
=or(A2<>"X", isblank(A3))
It looks like this: |
H: Can you have two different names for the same alternative ("send mail as") email address in Gmail?
I can add me@mydomain.com under "send mail as" email address in Gmail settings.
But can I choose between two different names to use with it, like I can in e.g. Mac Mail?
For instance, can I set it up so when emailing I have the choice between sending mail as either Bob <me@mydomain.com> or Agent Black <me@mydomain.com>?
AI: Unfortunately, no.
However, if you're willing to use "plus addresses" you can mostly fake it.
Add a new "send as" address with Name of "Agent Black" and email address of "tog22+agentblack@gmail.com". (Obviously you'd use your own email address.)
When receiving mail Google will ignore everything between the + and the @.
I used to do the same when my kids were little to fake mail to and from their grandparents. |
H: How many words does the algorithm search through in Google Ngram?
When I run a query for "hers" in Google Ngram Viewer, I get back the word's frequency of occurrence as a percentage. We know the outcome percentage; what's the denominator on the other side? Is it 100 million words? More?
AI: Currently the total number of words is 468,491,999,592. (Approaching half a trillion)
You can obtain that figure by downloading the latest dataset.
In that dataset, the total_counts file(txt) lists the number of unigrams, pages, and books for each year.
Summing up the unigram counts yields the 468,491,999,592 figure.
Important notes:
Currently (Nov 2015), the latest Ngram data is the Version 20120701 set. It was compiled in 2012, but covers books from 1505 to 2008.
A unigram is mostly the same as a word. Details of Google's parsing may yield differences in (hopefully) rare cases.
Only words within sentences are counted. Reference: Syntactic Annotations for the Google Books Ngram Corpus(PDF), section 3.2.
The percent displayed on the graph is normalized per year. This means that there is no one "denominator" if you are trying to figure the real counts of a given word. (But you can get that data from the downloaded datasets.) See below.
How the graph is calculated:
Consider the word "circumvallate" (all lower case). From the data download, we look up the 1978 and 1979 figures and get:
Word
Count in 1978 books
Count in 1979 books
circumvallate
335
261
All words
4,365,839,878
4,528,331,460
Which calculates out as:
0.0000076732% in 1978
0.0000057637% in 1979
If we then look at the corresponding graph, and hover over the respective points, we get:
Which agrees with what we calculate. |
H: How can I sort data with named-ranges without breaking references to the ranges?
How do I create a named range which refers to cell value, not cell location? Or, how do I sort but preserve the value of named range?
I have a Google Sheet which has several named cells. When I sort the sheet, other cells which refer to the named range(s) change value because the name refers to the cell by location, not value.
For example:
A named range, bananaCount refers to B2.
A5 is a formula which uses the named range: =bananaCount.
If I sort the sheet by column A (fruit names) the value of B2 and the the bananaCount named range will become 1 because row 3 (Apple, ...) becomes row 2, which causes A5 changes to 1. I want A5 to remain 5 (B3 after sorting).
Now, if I cut/paste B2, the named range reference does update correctly. However, sorting does not update the reference.
(What I really want is a variable to refer to the cell value, regardless of moving the cell value elsewhere in the sheet by any mechanism -- either sort or copy/cut/paste.)
Any suggestions?
AI: You can't really have "variables" in a spreadsheet; it's not a programming language. The values are contained in cells and can be referred to by location, possibly relative to location of other cells. If cells get rearranged so that the relations within rows or columns are lost, that is already a problem.
In your example, you want to refer to Count of Bananas in a way that is independent of sorting. The function vlookup does this nicely:
=vlookup("Banana", A:B, 2, False)
This means: get the value in column B that's in the row with "Banana".
Of course, if you sort column B but not column A, this is going to break; but then the entire logic of Fruit/Count columns is broken. |
H: How can specific columns of a Google spreadsheet be exported as CSV?
I have a Google spreadsheet with 10 columns of data. I would like to export columns A, C, E, F as csv. I do not need to export the entire spreadsheet. Can this be done? I do not mind using Google script.
AI: A script cannot give a file to you (well, it could email it to you, but I think this is going too far). You'll need to use "save as csv" menu command, and since it only saves the current sheet, you'll have to create a sheet that has only those columns in it.
The straightforward way is to just create a new sheet and type in cell A1
={'My Sheet'!A:A, 'My Sheet'!C:C, 'My Sheet'!E:F}
If you have to do this often, retyping all this thing with sheet name in every place will get old. This is where a script can be useful. Here is a function that assumed you enter simply
My Sheet,A,C,E,F
into the cell A1, and converts this input into a formula.
function csv() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getRange(1, 1).getValue().split(',');
var formula = [];
for (i = 1; i < data.length; i++) {
formula.push("'" + data[0] + "'!" + data[i] + ':' + data[i]);
}
sheet.getRange(1, 1).setFormula('={' + formula.join(',') + '}');
} |
H: Prevent YouTube from knowing what videos I watch
I'd like to find a way to prevent YouTube from knowing what videos I like so it won't tell me what videos I may like (recommendations, suggestions etc.).
Is it possible to do anything in my browser for that? I use Firefox.
Could you please explain to me how they know about the videos I watch?
I don't have a Google account, so do they use JavaScript or Cookies to know about the videos I watch?
Or maybe they associate my IP to the videos from server-side?
AI: It's probably a combination of all three of JavaScript, cookies, and your current IP address.
The simplest thing is to use Firefox in "Private Browsing" mode (Ctrl+Shift+P). Of course, to get YouTube to "forget" you you'll need to create another browser session after each video you watch.
A more robust method is to use some sort of proxy that rotates your IP address, but that's beyond the ken of this site. |
H: Sorting Pre-Sorted Google Form Data by Timestamp
I have Google Form checkbox data that I am separating out into another table so that each checkbox selection generates its own line.
I received some help in pulling the data over, and the resulting table was sorted alphabetically. What I need is for that table to sort by timestamp with the timestamp data brought over as well.
The Form Responses tab is obviously where the responses are collected and the Sorted tab is where I need the data sorted by timestamp with the timestamp included.
Link
AI: In addition, if you don't mind the timestamp to be in the last column, you can change the 'sorting formula' to
=sort(ArrayFormula({transpose(split(regexreplace(join(";", 'Form Responses 1'!DD2:DD), "(\w+),\s(\w+),\s", "$1, $2;"),";")), VLOOKUP(TRANSPOSE(SPLIT(JOIN("/", REPT('Form Responses 1'!DI2:DI&"/", if(len('Form Responses 1'!DD2:DD), (len('Form Responses 1'!DD2:DD)-len(substitute('Form Responses 1'!DD2:DD, ",",""))+1)/2,)) ),"/")), {'Form Responses 1'!DI2:DM, 'Form Responses 1'!A2:A}, {1, 2, 3, 4, 5, 6}, 0) }),1,1)
Note that the REPT() function has a limit of 32000 characters ... Also make sure to format the column that will have the timestamps as DATE/TIME. |
H: Is it possible to bookmark a Google calendar or inbox for a specific account?
I have a Google account for work, and another personal account. I have on more than one occasion clicked the bookmark I made in my work folder and been confused by not seeing (e.g.) an important meeting on my calendar.
Only when I realized that Google treats the two calendars as identical resources (they have the same URL) did I understand what was going on.
Is there any way to correct this? Is there any way to bookmark my work calendar(s) separately from my personal calendar(s)? (Same with my e-mail?)
AI: This seems to be an undocumented feature, but you can use the authuser URL parameter.
So, you can create bookmarks that will take you directly to the calendar for a specific account, like so:
https://calendar.google.com/calendar/?authuser=mypersonalaccount@gmail.com
https://calendar.google.com/calendar/?authuser=mycompanyaccount@example.com
Gmail works similarly:
https://mail.google.com/mail/?authuser=mypersonalaccount@gmail.com
https://mail.google.com/mail/?authuser=mycompanyaccount@example.com
As does Google's Inbox by Gmail:
https://inbox.google.com/?authuser=mypersonalaccount@gmail.com
https://inbox.google.com/?authuser=mycompanyaccount@example.com
You may need to be logged in to both accounts using Google's multi-account feature, but my test with Google Chrome worked just great. |
H: Can I access other days for On This Day?
As of today, Facebook's "On This Day" allows users to see memories from only the current day. How about seeing memories from other days?
AI: No.
Per this post in the Facebook Help community from a verified Facebook Help Team member, this feature is not available.
Is there a "on this day" archives you can search for previous posts you have made? I can only view todays "one this day" provided in my notifications and can not search previous "on this day" that have been previously provided.
Thanks for your question! Unfortunately, the functionality you are requesting is not currently available. We will keep your suggestion in mind as we continue to improve Facebook.
It is then suggested that if this is a feature that you want, you should use the Facebook Feedback form |
H: Google Script Active Cell Validation
A Google Script I am writing that seems to be failing. The first part of this script is to validate that only a specific sheet is being changed. In this case column 3 of my sheet called Labor.by.month. If any other sheet gets updated then nothing should happen. Only column 3 should be impacted. My code works but it seems that any column 3 update in any sheet causes the change to occur.
How can I limit it to just one sheet? This is the code I prepared:
function onEdit(e){
// Set a comment on the edited cell to indicate when it was changed.
var sourcesheet = "Labor.by.Month";
var ss = SpreadsheetApp.getActiveSpreadsheet(); //obtain active sheet
var mysheet = ss.getSheetByName(sourcesheet); //declare sheet value
var editedCell = mysheet.getActiveRange().getColumn() //get column that active cell is edited from
if(editedCell == 3){
SpreadsheetApp.getActiveSheet().getRange('A7').setValue('Hello');
}
Logger.log(editedCell);
//var range = e.range;
//range.setNote('Last modified: ' + new Date());
}
AI: The following script will do what you want.
Code
function onEdit(e) {
if(e.source.getSheetName() == "Labor.by.Month") {
if(e.range.columnStart == 3) {
var r = e.range.offset(0, -2);
r.setValue('Hello');
r.setNote('Last modified: ' + new Date());
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.