text
stringlengths 83
79.5k
|
---|
H: Gmail : have all messages (read/unread) in one area?
Is there an option to not have Gmail separate read and unread emails? I just want to go to inbox and see all the mail. I can figure out for myself whether it's read or unread.
AI: Yes, anytime you can change your Gmail inbox setting.
From the Inbox styles and settings:
Open Gmail.
Click the gear in the top right.
Select Settings.
Select the Inbox tab.
In the “Inbox type” section, select an inbox style in the drop-down menu.
Click Save Changes at the bottom of the page. |
H: Color every other row in filter view
In Google Spreadsheets, I can use conditional formatting to color every other row in a table a certain color to make looking at wide rows easier. My problem is that I also want to use filter views so multiple people can sort the data differently simultaneously (which is why I can't just use basic filters), and the custom formatting is applied before the rows are filtered, which causes the filter views to have some adjacent rows be the same color, since they were originally an odd number of rows away. Is there any way to color the filtered rows differently or color them after the sort so colors would alternate?
AI: One can have alternating coloring for filtered views that involve only hiding some rows. This can be done by using the command subtotal which ignores the cells hidden due to a filter.
You should have a column, for example A, which is non-blank in every row that contains data. Then apply conditional formatting to A1:Z (for example) with custom formula
=iseven(subtotal(3, $A$1:$A1))
The code 3 means "count nonempty cells in the range". I.e., like counta but with filtered-out cells hidden.
If the cells are also sorted in the filtered view, there is nothing to be done: since the sort happens after any formatting is done, there is no function that can see into the future and predict how the rows will be sorted. The only suggestion I have is the same as in my earlier answer: replace filtered view with sort and filter on another sheet. Then, the conditional formatting can be applied with the simple iseven(row()) and will remain alternating. |
H: ImportXML with XPath does not return an entry of a table
Using Google Sheets with IMPORTXML to scrape a piece of information from a website via XPath.
Here's the site (click here).
The specific piece of information I'm trying to extract is the Price/Sales (TTM) number, i.e., 2.97
Here's the XPath (I've tested it using the Google Chrome Extensions XPath Helper and XPather. It works.):
//div[@id='audit-integrity'][1]/table/tbody/tr[10]/td[2]
Here's my Google Finance function:
=IMPORTXML( "https://eresearch.fidelity.com/eresearch/evaluate/fundamentals/keyStatistics.jhtml?stockspage=keyStatistics&symbols=aapl" , "//div[@id='audit-integrity'][1]/table/tbody/tr[10]/td[2]")
The function doesn't work. Why?
AI: It's because of <tbody>. There is no <tbody> in the HTML source. Browser puts it there (on its own; nothing to do with JavaScript on the page) because it believes it should be there, according to HTML spec.
Just remove /tbody from the path:
=IMPORTXML( "https://eresearch.fidelity.com/eresearch/evaluate/fundamentals/keyStatistics.jhtml?stockspage=keyStatistics&symbols=aapl" , "//div[@id='audit-integrity'][1]/table/tr[10]/td[2]")
And in general: when XPath doesn't work, debug by removing all of the selectors, then adding one by one until the formula breaks... |
H: Is it possible in Google Sheets to generate an email address based on data from two different cells?
I'm creating a database of individuals in a company in Google Sheets. I'm collecting the persons email address, first name, last name all in different columns. The email addresses for all these people always use the same syntax, first.last@company.com.
Is it possible to create a function in Google Sheets that will auto generate the email address based on data entered in the "First name" and "Last name" columns?
AI: =CONCATENATE(A1,".",B1,"@company.com") will do exactly what you want:
It may not be the prettiest answer, but you can also combine a few concat() functions together to get =CONCAT(CONCAT(CONCAT(A1,"."),B1),"@company.com") to do this: |
H: Best way to iterate through all input arguments?
I am writing a custom function in sheets that will not have a defined number or format of arguments. As an example, the call might be:
=myFunc(a1:b3,a2:a4,b1:b9,c1,d2, [might be more, might be less])
I want to step through every value sent in and operate on it but run into all kinds of problems (mostly my own I am sure). I seem to run into problems distiguishing between a 2D and 1D set of inputs. Conceptually, I was thinking of something like this(not my actual code).
function myFunc(values) {
var i;
var calcVal = 0;
for (var j= 0; j < values.count; j++) {
if (values[j] > 1) {
calcVal = calcVal + values[j]*j;
}
}
return calcVal;
Is there some straightforward way of walking through each value coming in one at a time?
AI: Whenever an argument is a range containing more than one cell, the custom function receives a 2D array. For example, suppose this is your spreadsheet.
+---+---+---+
| | A | B |
+---+---+---+
| 1 | 5 | 7 |
| 2 | 6 | 8 |
+---+---+---+
Then:
myFunc(A1:B2) receives [[5,7],[6,8]]
myFunc(A1:B1) receives [[5,7]]
myFunc(A1:A2) receives [[5],[6]] - single-cell rows are still given as arrays.
myFunc(A1) receives 5 (a single cell is not given as an array).
So, the first order of business would be to standardize these so that everything is represented by a 1D array. Like this:
function flatten(arg) {
if (arg.constructor === Array) {
return arg.reduce(function(a, b) { return a.concat(b); });
}
else {
return [arg];
}
}
Then your function could use the special arguments object to handle the unknown number of arguments. In my example, allCells is a 1D array containing the values of all cells involved. For demonstration, I have it returned as a comma-separated string.
function myFunc() {
var allCells = [];
for (var i = 0; i < arguments.length; i++) {
allCells = allCells.concat(flatten(arguments[i]));
}
return allCells.join(); // or whatever you want to do with data
}
For example, myFunc(A1:B2, A1:A2, B2) returns the string "5,7,6,8,5,6,8". |
H: How do I delete a shared Google Drive document owned by somebody else?
If I delete a document owned by me, everybody loses access to that document. However, if I delete a document owned by someone else, it is only deleted from my point of view. Everybody else still sees that document.
In an environment where everybody is responsible for maintaining a pool of documents, this is terribly confusing. How do I delete a document on behalf of another user so that the document is gone for everybody?
Edit For Google Apps accounts, this was resolved nicely in late 2018 with the introduction of the Team Drive feature. We've had good experience with the co-ownership use case I described above after moving documents into one.
Jury is still out on a good solution for personal accounts.
AI: To work around the problem, you can use a naming convention and a script. E.g., the users can agree to consider a file deleted if its name is "zzz_delete_this_file" (multiple files can have the same name in Google Drive).
Users can also install the following script (general information on scripts) and have it run every hour or every minute:
function myFunction() {
var files = DriveApp.getFilesByName("zzz_delete_this_file");
while (files.hasNext()) {
var file = files.next();
file.setTrashed(true);
}
}
This moves all files with such a name into trash; in 30 days they get deleted. |
H: What does Airbnb mean by "0.5 bathrooms"?
I see "0.5 bathrooms" on the options on filtering the search results.
What does it mean?
AI: Presumably the same as in real estate listings. That it's only a sink and a commode, no shower or bathtub. Also known as a "powder room".
More information: https://en.wikipedia.org/wiki/Bathroom#Variations_and_terminology |
H: How are pages on different tabs notified when logging out from Google account?
When I logout in my browser (Firefox) from Google account, I can see that some pages in other tabs (not all belong to Google ecosystem) are refreshed and I guess that some logout notification was delivered by something to them. How does it work?
AI: It's going to depend on how each application has implemented Google's API for user authentication. Most likely there's some Websocket or AJAX calls going on in the background polling Google to see if you're logged on. When it finds that you're not the calling app changes your status. |
H: GitHub exclude README.md from download zip
So I'm pretty new to GitHub and I've spent the last 2 days getting to grips with it and frankly it's awesome! but you all know that already! anyhow...
I'm under the impression that you need a README.md for the page description but I have run into a problem with one of my projects and I'll do the best I can to explain the issue.
When developing Joomla plugins, modules or components your zip files need to have a folder within the zip with all your files. This causes a problem, the license and README.md file are contained outside of the parent folder, meaning when people click to download zip they get the add-on but they are unable to install it without deleting those two files beforehand.
Now correct me if I'm wrong if I use a .gitignore this will only stop tracking locally for adds, commits and pushes, not excluding those files within the download zip file.
You can view my Joomla Webmaster Site Verification Plugin on GitHub which should give you an idea what I'm talking about. Ideally, I'd like to have a page description but exclude both README.md and license when people click the download button, as they may want to install from GitHub using remote URL method.
Looking for either a workaround or a fix.
AI: READMEs are very important to GitHub repos, and you've used yours well so I would recommend against adding those files to your .gitignore.
Instead, I would recommend using GitHub releases and provide the "clean" zip file there. You could also use your README to point to the latest release download link when you get that setup. |
H: How to easily add flight itinerary to Google Calendar from flight confirmation email in Gmail?
I got an email from my colleague about our business itinerary containing flight confirmation as a PDF attachment. Turns out Google can detect that it's a flight confirmation.
When I search 'itinerary' in Google it shows something like this.
My question is, is there a way to add this info to my Google Calendar? (I want the flight schedule to be shown in my Sunrise app in my iPhone)
AI: To add any email event to your Google Calendar...
Web mail version:
Open the web version email, Click on the "More" icon (3 vertical dots to the right of the "Labels" icon) in the Top toolbar menu, then select "Create event".
Make sure you are clicking on the GMail "More" icon above and not the "more" (3 dots) inside the Email header.
Mobile version:
ONE TIME:
Open Settings in the Mobile Calendar app. Open "Events from Gmail". Turn this setting ON for your email address. Set visibility if applicable.
Sometimes Gmail copies all the event details you need into the calendar event description.
Depending upon how well Gmail reads the PDF file (or email), you may have to copy / paste the details from the original to the Calendar event. |
H: Gmail: emails won't stay in inbox when moved back from bin
For some strange reason some of my emails go straight to the bin, when I move the email back into the inbox and refresh it automatically gets moved back into the bin and I have no idea why this is happening and how I can prevent it. I have deleted all my filters and disabled POP incase that was causing it.
This happens when I access gmail on my laptop and when I use my phone.
My case sounds similar to this one, but I'm not accessing my emails with a email client other than my phone: When I move spam to my inbox, it goes back into the spam again
AI: I found the fix to my problems, I'll list the steps I took below but I have no idea why it worked
Delete all my filters
Select all the emails in my bin that refused to be moved directly back to the inbox
Mark all the emails as Spam
Go to the Spam folder, select all the emails again and mark as Not Spam
voila they move into my inbox and not the bin
All new emails that were previously being binned are now going into my inbox and staying there
Like I said no idea why marking and un-marking it as Spam fixed the problem but it did. |
H: I want to exclude certain local folders with Google Drive but I *keep* them on the computer
Using Google Drive on Windows (although I think the same question applies to OS/X) I want to exclude certain local folders but keep them on the computer. When I go to Drive preferences and deselect specific folders, it wants to remove them from the local PC and keep them only in the cloud. This doesn't work for me. I feel like I could do this in earlier versions of the Google Drive client but I cannot recall for sure. Is this possible?
AI: Unfortunately, you can't do that with Google Drive. Removing a folder from the list of folders to sync removes it from your local drive.
Google Drive presumably assumes that the "master" version of your files exist in the "cloud". A folder set to not sync exists at drive.google.com, but can't exist on your hard drive. (At least, not in the Google Drive folder.)
You'll need to look for a different solution. Dropbox seems to work more the way you want. |
H: Changed Google Page ownership, now can't log into email
I had a Google Plus business page where and I changed the ownership of the account to a new manager.
The Google Plus page had an associated email account that could be logged into just like any other Gmail account.
However, after the Google Plus page ownership was transferred, the password for Gmail account owned by the Google Plus page no longer applies. It says the password was recently changed. There was a link that says "Didn't change your password?", and I clicked through to that, and ended up on a message that says:
Password information
Please contact your account owner to reset your password or retrieve your username.
The new account owner is my personal Google account, but even though I can go to the Google Plus page and confirm that I am the owner, I can't see any options for changing the password on the Google plus business page.
How do I regain access to the Google Plus business page's Gmail interface now that the owner has changed?
AI: It seems that after having transferred ownership of the Google+ business page, the previous password for the Gmail account associated with that business page is reset or something. I guess maybe the assumption is that if you transfer ownership, you don't want the old owner to have access, maybe?
In any case, turns out that you need to set a password for the Gmail account after changing ownership. To do so, you log in as the owner of the business page. You then go to that page's settings.
In the settings interface, you scroll down and you will hopefully see this:
Click on the "set up a password" button, and after that it should be self explanatory.
Took me a lot of of searching for me to figure this out. Hope it's helpful to someone. |
H: Undo view Google Photos in Google Drive?
When I went to my photos in Google Drive, a popup appeared asking if I want to be able to view my photos in Google Drive. I selected "Yes". How do I reverse this change?
AI: Go to Settings, then on the "General" tab, uncheck "Automatically put your Google Photos into a folder in My Drive". |
H: What can break the relationship between the onFormSubmit function and a spreadsheet that is attached to a google form?
I had a working Google form, Google spreadsheet, and GAS script which would be called when the form was submitted. It worked fine until the did (one?) of the following things:
Cleared out the Responses
Moved the sheet and the form into a folder on Google Drive by themselves (and a Google Document)
Modified the form a bit, moving questions around, adding them and such.
When I submit the form, the data still shows up in the sheet but my .gs script is not called any longer for some reason.
The script sends mail, but I also wrote a function to check my quota for sending mail from it and it says I still have some quota left for the day I can still send 89 emails:
function test() {
var emailQuotaRemaining = MailApp.getRemainingDailyQuota();
Logger.log("Remaining email quota: " + emailQuotaRemaining);
}
The script is 173 lines long, it doesn't seem like it's that big.
I already have the Resources->Current Project's Triggers setup to send an email immediately.
Is there any way to check why the onFormSubmit function is not being called?
AI: There's a defect listed on the Google Apps Script issue tracker.
We'll have to wait it out to see when a project member responds to it, I'm assuming. |
H: Is it possible to use my name (in Greek) to create a Google account?
My name is Σ…ς Π…ς Χ…λ in Greek, and I would like to use this when creating a Google account. Is there anyway to get Google to use Unicode when creating my account so that my e-mail address will be Σ…ς.Π…ς.Χ…λ@gmail.com?
AI: At this time is not possible.
From A first step toward more global email - Official Gmail Blog
Starting now, Gmail (and shortly, Calendar) will recognize addresses
that contain accented or non-Latin characters. This means Gmail users
can send emails to, and receive emails from, people who have these
characters in their email addresses. Of course, this is just a first
step and there’s still a ways to go. In the future, we want to make it
possible for you to use them to create Gmail accounts. |
H: Recent installation of Opera imported Gmail session from Firefox
My Firefox had a Gmail session active, then I was needed to make a fresh install of Opera browser. After the installation of Opera finished, I pretended to log in into my Gmail, I was expecting it was necessary to me to set my username and password and then my phone verification, but no, my session automatically opened.
From previos experiences, when I pretended to start session into Gmail from Chrome (or any new browser) it required me phone verification and username with password.
To me that is not a problem, but why did it happen?
AI: I'm speculating here, but a couple of possibilities come to mind:
you already had an active session with your Google account and signed in from the same IP address; it seems logical to assume it was you
Did you copy your Firefox configuration to Opera? Did that include cookies? User agent? Google may have believed that you were using the same browser, especially since it was using the same IP address for your active session
perhaps neither of these things are absolutely true, but instead Google only offers the extra security if it doesn't have a high degree of certainty who you are. I'm sure Google has a number of things they look at to make that determination |
H: Comparing times on Google spreadsheet
I want to check if a set of fields indicate times of the day that are before 11am. The dates are stored in this format: 8:42:00 AM
I tried A1<"11:00:00 AM" but it always returns True, even if it was after 11am
Maybe a solution is convert it to Epoch first? or is there a more straight forward way? any working approach will be appreciated.
AI: The problem is that "11:00:00 AM" is not a time value, it's just a string with characters 1, 1, :, 0, and so forth. You can convert it to a time value with timevalue function:
=A1<timevalue("11:00:00 AM")
or better yet, define the time directly with time
=A1<time(11, 0, 0)
The second approach is locale-independent; it does not rely on conventions such as AM/PM vs 24 hour clock. |
H: Asterisk character (no wildcard) on conditional formatting
I have a sheet with following values on column A:
[ A ]
[1] Dead line
[2] 15 days remaining***
[3] Dead
[4] 131 days remaining*
[5] 80 days remaining**
I would like to use conditional formatting on column A so:
when only 1 asterisk appears: green cell background
when only 2 asterisks appear: yellow cell background
when only 3 asterisks appear: orange cell background
when column is Dead: red cell background
But when I set to A:A the rule text contains with value * to paint with green background, the whole column is painted with green background, regardless of other rules.
I see that the * is interpreted as an wildcard to "any string", but I would like to threat each * as one asterisk character only.
Someone can help me?
PS:
The final sheet must use this format of data on column A, with those awful asterisks (no way to change);
A1 is a header;
It is only a sample. Original sheet has so many lines...
AI: You can achieve your desired results by putting a tilde, ~ in front of the asterisk as an escape character, if you put the conditional formatting rules in the order listed below.
First, create the one for orange when three asterisks occur using text contains and then specifying ~*~*~*. Select custom to pick an orange background. Then create the one for two asterisks using text contains and ~*~* picking yellow for the color. Then for the next rule create one for green with text contains and ~*. Then you can create the one with a red background using text is exactly specifying Dead and picking red for the background.
You should then see the following: |
H: Pull in analytics and click stats for goo.gl links in Google Sheets?
I've used this guide to create a Google sheet that creates shortened goo.gl links - is there any way I can update this to show the click stats in the next column?
AI: With the code below, you're able to insert the analytics information as well.
Code
var SHORT = "short", INFO = "info", LONG = ' long';
function onOpen() {
SpreadsheetApp.getUi()
.createMenu("Shorten")
.addItem("Create Links !!","createShorts")
.addItem("Get analytics !!","getInfo")
.addItem("Get long URL", "getLong")
.addToUi()
}
function createShorts() {
performAction(SHORT);
}
function getInfo() {
performAction(INFO);
}
function getLong() {
performAction(LONG);
}
function performAction(action) {
var range = SpreadsheetApp.getActiveRange(), data = range.getValues();
var output = [], url, value, index;
for(var i = 0, iLen = data.length; i < iLen; i++) {
value = data[i][0];
switch(action) {
case SHORT:
url = UrlShortener.Url.insert({longUrl: value}), index = 1;
output.push([url.id]);
break;
case INFO:
url = UrlShortener.Url.get(value, {projection: 'FULL'}), index = 1;
var a = url.analytics.allTime;
output.push([flattenObject(a)]);
break;
case LONG:
url = UrlShortener.Url.get(value), index = 2;
output.push([url.longUrl]);
break;
}
}
range.offset(0, index).setValues(output);
}
function flattenObject(obj) {
var f = new cFlatten.Flattener();
return f.flatten(obj);
}
Explained
Continuing from the answer you used as a guide, a couple of things have changed:
menu has another item
code is re-used to perform both actions
the cFlatter is used to flatten the object obtained from the url.analytics.allTime
Perform the same action as you would do for creating the urls, but now select the shortened urls and pick the new menu item in the Shorten menu.
You can change projection: "FULL" into:
"ANALYTICS_CLICKS" - returns only click counts
"ANALYTICS_TOP_STRINGS" - returns only top string counts (e.g. referrers, countries, etc)
or you can change url.analytics.allTime into:
url.analytics.month
url.analytics.week
url.analytics.day
url.analytics.twoHours
to alter the analytics information.
Screenshot
Library Key
Add the library key, of the cFlatten library, in the Script Editor under Resources > Libraries:
References
Url: get
GAS library cFlatten by Bruce McPherson (MqxKdBrlw18FDd-X5zQLd7yz3TLx7pV4j) |
H: Report/process only using the last entry made by the user in Google Forms
I have a form where students can enter choices: for instance the specialisation they want to pursue, and the semester when they will start that specialisation.
An example entry form is here, but it has not much interest, other than add addition data to the example processing sheet. You can copy the sheet locally to edit it, and it will still pull the form data over.
I decided not to use the option on the form to allow only one entry per student as students often change their mind, make a new entry several months later. They were told that only their last entry will be considered at a specific deadline.
I wish to have some reporting in place that shows an overview of all choices, lists the students per specialisation etc... but only taking into account their last entry, and without deleting previous entries made.
To look up the last entry for a specific user, it is easy using:
query(importrange("1L3V0HIN69aVvCV-4Hx7m39w6zsuBZEaK2L0JDULP0NY","Form Responses 1!A:E"),"select Max(Col1), Col2, Col3, Col4 where Col2 contains '"&C1&"' group by Col2,Col3,Col4 order by Max(Col1) desc limit 1",0)
The e-mail (or part of it would be stored in C1). The trick is the limit 1 clause at the end combined with the order by clause.
But this no longer works when trying to filter for the whole cohort following a specialisation at a specific start date, or counting the amount of students per specialisation, etc.
This is where I could use some help. Maybe adding a column "outdated" and filling that in via an array formula could be an option, but I struggled with making that work on the original response spreadsheet.
AI: One approach is to add a status column next to the data input: for example, in L10 it would be
=if(iserror(match(H10, H11:H, 0)), "current", "obsolete")
which returns "current" if no entry below the present row has the same email. Then your query can filter out the obsolete results.
The above does not work with arrayformula. I don't think there is an arrayformula-compatible approach, because the number of comparisons is quadratic in the size of array. Here is a script solution that auto-expands: put status(H10:H) in a new column, with the following function in a script.
function status(arr) {
flat = arr.reduce(function(a, b) { return a.concat(b); });
var output = [];
for (var i=0; i<flat.length; i++) {
if (flat[i] === '') {
output.push(['']);
}
else if (flat.slice(i+1).indexOf(flat[i]) === -1) {
output.push(['current']);
}
else {
output.push(['obsolete']);
}
}
return output;
}
The approach I took in this answer also works reasonably well here: use unique to get unique users (identified by emails), then filter rows by email, and use vlookup to pick the data just from the last row. The result will be a neat summary table that has only the latest data.
Using your example, I build such a table starting from the cell A20. In A20, I enter
=unique(H10:H)
obtaining the list of emails. Then in B20 I enter
=vlookup(999999, filter($G$10:$K, $H$10:$H=$A20), column()+1)
and extend this formula to the range B20:D. This is the result:
+-----------------------------+-----------------+--------+-----------------+
| peter.goedtkindt@school.edu | SpecializationB | 2016.2 | changed my mind |
| student1@school.edu | SpecializationB | 2016.1 | |
| studnent2@school.edu | SpecializationC | 2016.1 | |
+-----------------------------+-----------------+--------+-----------------+
(I don't know if you needed comments, but I included them anyway.) Using column()+1 as the last parameter of vlookup allows the formula to pick the relevant column, after vlookup with absurdly large search key 999999 zooms in on the last entry. |
H: Don't allow comments on Facebook page
Is there any way to not allow people commenting on posts of my Facebook page?
AI: Unfortunately Facebook hasn't enabled a way to disable comments on pages.
People have already asked this question on Facebook Help Page and the answer provided by Facebook Help Team is How do I allow or disable posts by other people on my Page? |
H: View and edit data in Google Spreadsheets in a form
Question:
Is there any way to view and edit data in Google Spreadsheets in a form, like Microsoft Access or OpenOffice Base can do that? It would be perfect if you could cycle through each record, which would be the respective row in Spreadsheets. I've heard that you can include an HTML UI into Spreadsheets via Script. Would that be a possible approach?
Background:
I'm working on a seniors book in a group for my school and want to enter students data, e.g. name, birthday, favourite movie etc. Because we have over 150 students, it would take ages if only one person has to enter in all the data. I want to create a cloud-based solution in which everyone who is working for the seniors book can enter student data via an user-friendly form which can be accessed via browser. If there is some data missing from a student yet, we could easily edit it later on by using the form. Eventually, we would export all the data as .csv
AI: At this time, Google docs editors don't include a built-in feature but you could extend them through add-ons and Google Apps Script. But someone already did the hard work for us and developed a free Google Gadget that work together with Google Apps Script to use
Google Forms as the UI for creating and editing records
Google Sheets for storing records
Google Gadgets as the list/search UI
From Awesome Tables
The "Awesome Tables" gadget can be used to create a table from a
spreadsheet and add interactive controls to manipulate the data it
displays. It is not an Apps Script web app but a Google
Gadget and it uses the
Google Visualization
API.
From Awesome Table and Google Form
Awesome Table is mainly used to display data in multiple ways. But it
can also be very useful to let your users edit the data displayed.
Here's how to do it, using Google Forms : see the
documentation
(or take a look at the
spreadsheet).
If you try it, note that the changes you'll make can take a minute
before being displayed on the site. |
H: How do you reference a cell containing a date in a Query?
I have a table to keep track of hours put in working on an Interior Design project. The table looks something like this:
8/16/2015 6:30:00 PM 8:00:00 PM 1.50 Floorplan
8/19/2015 10:00:00 AM 10:30:00 AM 0.50 Layout
8/19/2015 12:00:00 PM 3:30:00 PM 3.50 staircase
In another table, I want to consolidate all the dates into a single row that sums up the total amount of hours worked that day and concatenates the descriptions of what was worked on. So I'd like something like this:
8/16/2015 1.50 Floorplan
8/19/2015 4.00 Layout, staircase
The first part of making this happen, is writing a Query that could group the dates. This wasn't too difficult and I made it happen with
=QUERY(A2:E4, "select A, sum(D) group by A")
However, since I want to add the concatenated descriptions in the next cell, I've been trying to write a separate query for those cells. However I'm having a major issue, because I'm trying to look at the date on each row but I can't reference the cell from inside the query. So for example, I'm trying to insert this function:
=JOIN(", ", TRANSPOSE(UNIQUE((QUERY(A2:F4, "select E where day(B) = day(A6)))))
This function should get all the unique descriptions corresponding to a particular day (for simplicity ignoring the year and month), and join them up into a single cell. However it is failing because day(A6) is returning nothing even though there is a date in A6 from the previous query.
So the question is, how do I properly use a reference to another cell in a Google Sheets query?
AI: Indeed, one cannot put things like "A6" inside the query string because then it would just a part of a string, not a cell reference. Instead, concatenate the value of the cell to the string:
=JOIN(", ", UNIQUE(QUERY(A2:F4, "select E where day(A) ="&day(A6))))
You don't need transpose, because join works equally well with one-dimensional arrays of either direction: vertical or horizontal.
That said, I find a solution using filter slightly more readable:
=join(", ", unique(filter(E$2:E$4, A$2:A$4 = A6))) |
H: Calculated field in Google Sheets not working
I have a pivot table created in a Google Sheet that looks like this:
Desktop | Mobile
Sessions | Trans. | Sessions | Trans. |
250 | 34 | 150 | 25 |
.... | ... | .... | ... |
It's basically some web stats grouped by Desktop vs Mobile. I'm trying to add a new column for each group that will calculate Trans. / Sessions
I tried adding a calculated field to the pivot table, but when I enter the formula it shows Formula parse error. The way I entered it is by adding the column name wrapped in single quotes:
='Trans.' / 'Sessions'
Here is an example.
AI: It appears you were trying to enter 'SUM of Transations' and so on into the formula. But "SUM of" if not a part of the name, it's just an indication of how the column was summarized. The following works in the calculated formulas:
=Transactions/Sessions
Since those columns are summarized using SUM, you will get the sum of transactions divided by the sum of sessions.
Quotes are not necessary here since you don't have spaces in column names. |
H: Is there a "best way" to send Google feedback?
I did use the feedback thing, but I have no idea if that is the best way. I'll be honest, I don't think they will ever read it, but I wanna try all my options.
If this helps, my feedback is about a missing feature: photos.google.com already uses tags, I can change/add tags in picasa and upload them, then when I search it finds pics based on tags. However the process is very backwards, un-intuitive and broken. If only they would add a small, bare bones feature where all you can do is add/delete tags without having to go trough the sync/block uplad & re-upload head-ache mess.
AI: Below link shows how to send feedback for Google's product:
Help improve Google’s products .
If you want to send the feedback to the Google photos team click on below link:
Welcome to the Photos Help Center.
Or you can join Google Photos Help Community to start a discussion. You will get expert comments here. |
H: Google Script Replace Function Reference
Is it possible to build a Google Script where I can select a cell, take its function, replace the cell references (instead of C2,C3,C4, etc. make it AC1,AC2,AC3, etc.), and then return the output of the new function?
If so, how would one go about writing that script?
AI: Like this:
Get the selected cell (for simplicity, I deal only with one cell even if a larger range is selected)
Get the formula from it.
If there is a formula, replace all references to C(number) with AC(number).
Put the new formula into the cell.
function replaceReferences() {
var cell = SpreadsheetApp.getActiveSheet().getActiveRange().getCell(1,1);
var formula = cell.getFormula();
if (formula) {
var newFormula = formula.replace(/(C\delta+)/g, "A$1");
cell.setFormula(newFormula);
}
} |
H: Google groups - lost ownership -- ownership invitation expired
I started a Google Group in June and then got busy with other things and haven't done anything with it since. It seems like I've lost ownership of the group and I don't know how to get it back. In the inbox of my group account, there was this email:
When I clicked on the "Accept this Invitation" button, I was told that the invitation had expired. Now I don't have ownership of the group anymore. How can I get it back, or at least create an all new group with the same name? I had only invited three members, so that's easy enough to recreate.
There was also another email I received:
I have permission to "visit" and "email" the group, but not "change settings" or "invite more users". If I try to do either of those things, I'm told that I don't have the permissions and need to contact an owner. But as far as I can tell, my group does not currently have an owner that has ownership privileges.
AI: Summary
At this time Google Groups have implemented features to prevent that a group be without at least one owner, so if you are sure that you have the owner role and can't access your group as owner, try one of the following:
launch your browser in private browsing mode,
sign out of your Google account and sign in again
clear the cache and delete the cookies
use another browser that you didn't use to access your Google account.
Content at the time that this answer was accepted
As LMcKin51- Google apps-Top Contributor said:
First of all, I'll need to make sure you are accessing your Groups
with the correct email account. If your account is correct, have you
asked the other owner if by any chances he deleted your ownership from
the Group?
Also, have in mind that a Group always need to have an owner.
Let me know how it goes.
and if you using an non gmail.com account and if you haven't created
a Google account for it create one here
https://accounts.google.com/SignUpWithoutGmail then you be able to
Manage your group.
If you can't recall the account you can try using the recovery tools
that Google provides to remember the username
https://www.google.com/accounts/recovery/forgotusername
I just tried to remove myself from a group, but I can't.
Attempt to remove the owner role from my own account
Attempt to abandon the group |
H: why is one row skipped when including ranges from two sheets
I have a spreadsheet with some test data: https://docs.google.com/spreadsheets/d/1Rd8uJp2KTl2ds-s_SWvUSkxNjEscAEiwAO71zSJ2A8Q/edit?usp=sharing.
In the 'All Transactions' sheet, why is row 3 from the 'source data 2' sheet included when I sort by 'category' but not when I sort by 'date'?
AI: The data is there, but it's out of sight because of the blank rows that are included due to the use of whole columns (A2:B). Filter the rows where A or B cells are not empty. One way to do that is by using QUERY(), i.e.:
=QUERY({{'source data 1'!A2:B};{'source data 2'!A2:B}},
"Select Col1,Col2 Where (Col1<>'' OR Col2<>'') Order by Col1",0) |
H: How to count rows in Google Sheets that do not contain a specific text
I need a formula that will tell me how many projects are going on at any given time in my Google spreadsheet. My table header looks like this:
Project | Jan 1-5 | Jan 6-10 | Jan 11-15...
And each row will either be empty, or have text in the different cells (to show what was happening on a given date). For instance:
Project 1 | U | U | L
Project 2 | P | M | M
Project 3 | M | O | K
I found this formula which works very well, however, it counts each row with a value. I need to add a criteria that says that says not to count "M" or "P" as a value.
=ArrayFormula(
SUM(SIGN(MMULT(LEN(Sheet1!B3:E),TRANSPOSE(SIGN(COLUMN(Sheet1!B3:E))))))
)
For the example above, this would give me the answer of 3, but I am looking for it to say 2.
AI: Here is an approach similar to yours; the filtering is done by regexmatch in the middle.
=countif(mmult(
arrayformula(if(regexmatch(B3:D,"^[^MP]$"),1,0)),
transpose(arrayformula(column(B3:D)))
),">0")
Explanation:
regexmatch(B3:D,"^[^MP]$") matches the cells that contain one letter which is neither M nor P.
if(...,1,0) converts boolean match result to 1 or 0.
arrayformula applies the above to the whole array, obtaining a matrix of 1s and 0s. It remains to count the number of rows that contain at least one 1.
As in your formula, this is done by multiplying the matrix by a vector with positive entries and counting the number of positive results. The vector I use is transpose(arrayformula(column(B3:D)))
After the multiplication, countif(..., ">0") counts the positive entries. |
H: Stop searching google sites
Is there a way to stop google and other search engines searching my Google Sites website? Is there any robots.txt?
AI: robots.txt of Google Sites is not user-editable. https://productforums.google.com/forum/#!topic/sites/E4lCgoEv6yw
Instead, you can use Google Search Console (a.k.a. Webmaster Tools) to remove your site from Google results. For more information see "How to remove your website or web page from Google". The tool's layout has since changed, but once you log in to the tool, you can still find "Remove URLs" under the heading "Google Index". |
H: Google Sheet conditional formatting, highlight just 1 cell in a range based on another cell
How can I highlight a cell in a range, if its value is equal to a different cell?
Example:
Random numbers in range A5:A20.
I want to highlight a cell in this range if it is equal to B4.
[ A ][ B ][ C ]
[ 3 ]
[ 4 ] 24
[ 5 ] 20
[ 6 ] 24
[ 7 ] 18
In this case I would want only cell A6 to highlight as it equals B4.
I feel like it should be easy, but can't get it to work.
AI: You can use "format cells if equal to...", but there are a couple of things to watch for:
the reference to B4 should be B$4, with an absolute row number
the rule "if equal to... B$4" would mean the cell value has to be literally "B$4". You want "if equal to... =B$4" |
H: How do I vertically center the text in the header of a Google document?
I'm using Google Docs, and I put some text in a header, and it is showing up very close to the top of the page. I want to position the text so that is vertically centered between the top of the page and the bottom of the top margin. For example, if the page has a top margin of 1", I want the text to show up around 0.5" from the very top of the page. This is similar to what Pages on OS X does by default. How can I do this?
AI: At this time, Google Documents doesn't have a vertical align setting for headers. The alternatives are
Use line spacing, blank paragraphs, font size, etc.
Insert a table as it has vertical align settings.
Insert a drawing as its text shape has vertical align settings. |
H: Forward sent/outgoing mail and show it in correct threads/conversations
I get email in Outlook WebApp. I also happen to hate Outlook WebApp.
What I want:
Have outgoing emails (sent in the past) forwarded to Gmail
Have those emails grouped in their appropriate thread/conversation
Not have the emails text contents inside attachments (which happens with certain messages)
What I have:
Forwarding incoming OWA email
Sending email through OWA right from Gmail\
Purpose:
Have a centralized location to search for old outgoing messages
Save OWA space by being able to delete outgoing messages from thrre
Failed attempts
Forwarding sent mail using Apple Mail
Redirecting sent mail using Apple Mail
AI: How does Gmail decide to thread email messages? Having the same subject isn't enough; the In-Reply-To header must also be present.
ReplyWithHeader for Apple Mail works for manually forwarded email, but not for rules.
This AppleScript solves the issue (for a single use):
set recipientEmail to "example@example.com"
set recipientName to "John Doe"
tell application "Mail"
repeat with msg in messages in sent mailbox
set outgoing to forward msg without opening window
tell outgoing
make new to recipient with properties {name:recipientName, address:recipientEmail}
end tell
send outgoing
exit repeat
end repeat
end tell |
H: Multiple auto-populated select boxes Google Sheets Script UI
I found an example of how to auto-populate a drop-down select box from a Google Sheets range, for a Google Apps Script UI that enters new rows in the spreadsheet. I have so far been unable to figure out how to create multiple drop-down select boxes in the UI form. I would appreciate some hints on how to accomplish this.
I placed an example at Test UI Form that inserts new row that can be copied and tested. (Much appreciation to the fellow who shared the tutorials on his blog. I bought his ebook.)
In code.gs, the revelent code is
function getValuesForRngName(rngName) {
var rngValues = SpreadsheetApp.getActiveSpreadsheet().getRangeByName(rngName).getValues();
return rngValues.sort();
}
//Expand the range defined by the name as rows are added
function setRngName() {
var ss = SpreadsheetApp.getActiveSpreadsheet(),
sh = ss.getSheetByName('DataLists'), firstCellAddr = 'C2',
dataRngRowCount = sh.getDataRange().getLastRow(),
listRngAddr = (firstCellAddr + ':C' + dataRngRowCount),
listRng = sh.getRange(listRngAddr);
ss.setNamedRange('Cities', listRng);
}
The html file looks like this:
<div>
<form>
<table>
<tr>
<td>Select item</td><td><select name="city_list" id="city_list"></select></td>
</tr>
<tr>
<td><br/>
<br />
<script type="text/javascript">
// Client-side JavaScript that uses the list returned by
// GAS function "getValuesForRngName()" to populate the dropdown.
// This is standard client-side JavaScript programming that uses
// DOM manipulation to get page elements and manipulate them.
function onSuccess(values) {
var opt,
dropDown;
for(i = 0;i < values.length; i +=1){
dropDown = document.getElementById("city_list");
//dropDown = document.getElementsByClassName('city_list'); ///remove this
opt = document.createElement("option");
dropDown.options.add(opt);
// Remember that GAS Range method "GetValues()" returns
// an array of arrays, hence two array indexes "[i][0]" here.
opt.text = values[i][0];
opt.value = values[i][0];
}
}
function populate() {
google.script.run.withSuccessHandler(onSuccess).getValuesForRngName('Cities');
}
</script>
First name: <input id="firstname" name="firstName" type="text" /><br/><br/>
Last name: <input id="lastname" name="lastName" type="text" /><br/><br/>
<input onclick="formSubmit()" type="button" value="Add Row" />
<script type="text/javascript">
function formSubmit() {
google.script.run.getValuesFromForm(document.forms[0]);
}
</script>
</td><td><br/><br/><input onclick="google.script.host.close()" type="button" value="Exit" /></td>
</tr>
</table>
</form>
</div>
<script>
// Using the "load" event to execute the function "populate"
window.addEventListener('load', populate);
</script>
AI: Add a new select with a new id, and assign a set of values the same way.
This should give a good idea how to fill multiple drop-downs from one data array where each column sets the drop-down value.
function onSuccess(values) {
//values is a 2d array.
var opt,
dropDown;
for(i = 0;i < values.length; i++){
dropDown_one = document.getElementById("id_one");
if (values[i][0]) { //check if there actually is a value
opt = document.createElement("option");
dropDown.options.add(opt);
opt.text = values[i][0]; //0 is first column
opt.value = values[i][0];
dropDown_one.options.add(opt);
}
dropDown_two = document.getElementById("id_two");
if (values[i][1]) { //check if there actually is a value
opt = document.createElement("option");
opt.text = values[i][1]; //1 is second column
opt.value = values[i][1];
dropDown_two.options.add(opt);
}
}
} |
H: Google Account without Gmail -> possible to obtain Gmail later?
If I create Google Account without Gmail today, will I be able to change my mind and acquire Gmail address in the future, keeping the same Google Account? (The last part is important because other people might share content with a Google account I give them so I don't really want to be changing Google accounts altogether.)
AI: Yes, you will be able to do so.
From https://support.google.com/accounts/answer/72198?hl=en
Adding Gmail
If you add Gmail to your Google Account, your account's primary
username will permanently change to yourusername@gmail.com.
After you add Gmail, the original email address associated with your
account will become your alternate email
address. If you
have verified your original email address before adding Gmail, you
will be able to sign in using this email address.
Adding Gmail to an existing Google Account
Go to mail.google.com.
Click Sign up for Gmail.
At the top of the page, click If you already have a Google Account, you can sign in here. You'll be redirected to a sign-in page.
Use your existing Google Account username and password to sign in. On the next page, you'll see a shortened Gmail sign-up form where you
can choose your Gmail username |
H: Can Gmail auto track replies of emails when conversation view is turned off?
I know Gmail for some time now allows conversation view to be turned off, thereby ungrouping the emails.
However, when doing so, any email replied to leaves no marker at all (as best I can tell), that the email was replied to. One can search in the "Sent Mail" to see something was sent, but when viewing the email itself (Note: I use the "Preview pane" from the Labs tab to view it), I do not see anything after I have replied:
letting me know I have replied and
linking the email to that reply.
I am hoping there is some other setting to do that. Otherwise, this seems to be a serious design flaw in the implementation of the ungroup conversation view setting. Ungrouping by subject is one thing, ungrouping to the point of not associating actual replies to the initial emails is overboard!
NOTE: I realize turning conversation view "on" associates the replies to the emails. My question concerns how they are/can be associated when turned off. I do not want emails with the same subject line grouped (hence why the view is off), but I do want to know which emails I've replied and what that reply is based on looking at the original email.
AI: At this time the GMAIL web UI can't. The alternatives are to use a POP or IMAP client.
References
Gmail Help
http://support.google.com/mail
Gmail Help Forum
Turning conversation view OFF causing another problem: I can't see my replies in email threads. |
H: How to return DISTINCT/UNIQUE list of text via Google QUERY?
Given the list of categories and sub-categories:
CatA SubCatA
CatA SubCatA
CatB SubCatB
CatB SubCatB
CatC SubCatC
CatC SubCatC
I'd like to return all unique main categories based on the secondary category.
I don't want to use:
=QUERY(A1:B6,"SELECT A WHERE B = 'SubCatA'")
as it's returning the list with duplicates (returning first element won't help either).
What I'm trying is:
=QUERY(A1:B6,"SELECT A WHERE B = 'SubCatA' GROUP BY A")
but it gives me the error: CANNOT_GROUP_WITHOUT_AGG, therefore I'm trying to find something equivalent to either DISTINCT(A) or UNIQUE(A), but these functions doesn't exist.
Is there any function in Google Visualization API Query Language equivalent to DISTINCT/UNIQUE to return list of unique values?
AI: Without a query:
=unique(filter(A1:A6, B1:B6="SubCatA")) |
H: The payment is not affected when a negative value is put in
Here is my scenario:
Service technicians go to a job site and performs work. As per the instructions on his service ticket he is to collect $100 from the customer. However he had to use an additional part costing $50. Also, there was a part from the original order he did not use that cost $25 and he needs to remove that from the amount owing.
So I have created a form for "Change Orders". The first tab I created is Original Balance and is set to "Collect Payment". The next tab is where the tech enters the cost of the parts added and is set to Collect Payment. The next tab is where the tech enters the negative cost of the parts not used and is set to Collect Payment. However the payment is not affected when a negative value is put in.
So it should be $100+$50+(-$25)=$125
However I get:
$100+$50+(-$25)=$150
Am I doing something wrong?
AI: Cognito Forms does support negative amounts when collecting payment. However, we prevent negatives from appearing on an invoice based on user input to protect our customers from scenarios like this:
Cognito Forms customer creates a registration form for an charity event, charging $85 per ticket
Form also includes an additional donation amount field on the form
In this case we prevent negatives by default for the donation field to prevent someone from entering a negative amount and thus getting a discount on their tickets.
However, you can definitely include negatives as long as you use the Price field. In your case, just add a Price field near the field where they are entering the amounts. Set the calculation for the Price field to pull the value from the original field. You can even allow them to enter a positive amount for the part and make it negative in your calculation. Then mark the Price field as hidden so it will only appear on the invoice, not the form. Clear the Collect Payment setting for your original field.
Using this approach, you can force Cognito Forms to accept the negative deduction from the invoice. You can even use a Repeating Section to capture each part and the amount and have both the part description and amount reflected on the invoice using the Price field, since you can also calculate the line item name and description. |
H: How to find and see all my tweets?
Is there a way to find or index all my tweets on Twitter web or in Twitter app?
AI: Login to your Twitter account. Look at left sidebar menu, click on Profile (on top of your profile header it shows your name and total number of tweets), now below your profile details there is a tab called Tweets, click on the Tweets, it will list the all your tweets (retweets). If you want to see replies also with tweets/retweets then click on Tweets & replies tab.
But in case you have a huge number of tweets and want check any particular tweet or very old tweet, you can use Your Twitter archive.
Once you have your Twitter archive, you can view your Tweets by month, or search your archive to find Tweets with certain words, phrases, hashtags or @usernames. You can even engage with your old Tweets just as you would with current ones.
Some third party tools are also available to see all tweets and one of them is All My Tweets. (Please note I have not tested this tool.)
Update:
If you want to search and delete a tweet you can use Advanced Search feature of Twitter. Find a tweet and delete that.
Here is an article also, you can read this, it will give you some help.
This can be done also by using Your Twitter archive, download your Twitter archive to your computer. You'll be given a HTML and CSV files that are even easier to search than the online interface. If you find any shameful tweets, you can switch to the Web versions to delete them.
In this case again you can use some third party tool like TweetDeleter.(Not tested.) |
H: Track clicks on spreadsheet cells with an URL
I know I'm pushing the boundaries of what a Spreadsheet is but I want track the number of times a cell with an URL is clicked on.
URLs in cells are automatically turned into links by Google, this is quite convenient. I want a cell next to it which tells me how often that (generated) link was clicked.
+------+--------+
| Link | Clicks |
+------+--------+
| foo | 0 |
| bar | 33 |
| baz | 1 |
+------+--------+
Is this a pipe dream or can it be done? I don't even know were to start looking.
AI: At this time Google Sheets doesn't include built-in functions to do that. You require something else that track URL visits like Google URL Shortener, Google Analytics, among others. If the tool that you choose is able to publish to the web the number of clicks or has an API you could add that information to your spreadsheet through built-in functions like IMPORTHTML().
Google Analytics has a URL builder that could help you. Also there is an add-on that help to pass data from Google Analytics to a Google spreadsheet.
References
Google spreadsheets function list - Docs editors Help
Extend Google Docs, Sheets, and Forms with Apps Script - Docs editors Help |
H: Delete a file locally, but have the backup remain on Google Drive
Is there a setting, or a third party application that will allow me to do this? My school gave me unlimited Google Drive storage, and I want to take advantage of it by backing up everything.
AI: To get this result, put the file into a folder within GDrive, wait for it to sync to the server, then set your desktop GDrive settings so that folder is no longer sync'd to your local disk. This will keep the copy on the server and remove the desktop copy.
Once you have GDrive folder(s) that are not sync'd, you can upload more files into it/them via the web page uploader. Alternatively, put files in a sync'd transfer folder, let them sync, then use GDrive's web interface to move them into an unsync'd folder.
Update: The current version of GDrive in 2022 can be configured for either mirroring or streaming. Once you configure GDrive for mirroring, you can right-click any file or folder and pick its "Offline access" setting:
Online only -- You can access this file only when your computer is online. GDrive will fetch it from the server as needed. GDrive needn't keep a local copy when you're not using it, but it has to guess when to discard the local copy.
Available offline -- You can access this file whether your computer is online or offline because GDrive keeps a local copy of it. |
H: Transferring S3 bucket ownership
I'm doing a data migration from Rackspace to Amazon S3, and I'll be using NetApp's AltaVault product to do it (i.e. the "cloud agility" option on the appliance).
After I do the migration and the data is in an AWS S3 bucket, is there any way that I can then have Amazon transfer ownership of this bucket of data from me to someone else with an Amazon account?
AI: There is no documented way to change ownership of a bucket. To the contrary, the documentation states that bucket ownership cannot be changed.
Bucket ownership is not transferable
http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html
Even it were possible, that still leaves the issue of ownership of the objects in the bucket, since it is possible for a bucket to contain objects owned by a different account.
The bucket owner does not own objects that were not created by the bucket owner.
http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example3.html
(It's technically even possible for me to allow you to create objects in my bucket, and for you to then set the permissions such that I can't even view the objects. My only possible action would be to delete the objects -- there would be nothing I could do, to change the permissions, if I initially allowed you to do this.)
So, barring an answer to the contrary from AWS support, you will want to work with the correct account from the beginning. You need credentials from the desired account with permission to create the bucket, if it doesn't exist, and at a minimum, permission to put new objects in the bucket. You likely will also need permission to list and get objects, for verification of your sync process and final results. |
H: Is it possible to open embedded tweets in a new tab?
Since a while I have seen that some tweets are "embedded" within others. A recent example from my twitter feed:
If I want to interact with the embedded tweet, I have to click on it. Until I do, I cannot even select the text.
Unfortunately, clicking does not open the tweet in a new tab of my browser, meaning that when I'll go back to the feed I will have to scroll all the way back to where I was.
I have tried clicking with the middle mouse button, but it does not appear to work.
My current solution is to open the "embedder" tweet in a new tab (middle click on the time of the post) and then click on the embedded tweet.
Is there a less cumbersome alternative? (maybe some twitter option I missed?)
AI: If you're reading from the webapp then you'll need to hold down either Ctrl (on Windows) or Command (if you're on Mac) before clicking the embedded/replied-to tweet.
That will open it up into a new tab (or new window depending on your browser settings). |
H: How do I get Google Calendar to use the correct e-mail addresses?
I have a recurring problem that when I add a list of people to a Google Calendar event, it invariably picks the wrong e-mail address for some of them. I then have to delete each of the incorrect addresses, and add them back in manually, being careful to select the correct address for calendar (usually their Gmail address). If I don't do this, then they are unable to simply say "Yes" or "No" from either the web interface or a Calendar app, and have to click on the link in the e-mail. The weird thing is that it is different people each time.
It even selects the wrong e-mail address for me sometimes,† so I can't say I'm going to my own event! Again, I have to delete myself and add my Gmail address back in - it is all very tedious.
What I would like to know is how to ensure that Calendar always selects people's Gmail addresses in preference to their other e-mail addresses which don't have Calendar integration support.
I have tried building a contacts list with specific e-mail addresses, but that seems to be ignored. I don't want to create Gmail only contacts entries for everyone on the list, and I can't just delete peoples non Gmail addresses from their Contacts entry.
† See my answer to my previous related question
AI: Unfortunately, there is no setting in Google Calendar which will force it to prioritize people's Gmail addresses.
All you can do is either:
paste the Gmail email address in the "Guests" field, or
when you start typing the name of a guest in the "Guests" field, pay attention to the list of email addresses it gives you (assuming they're in your Contacts) and choose the Gmail one
If you're just pasting names into that field (or using a Contact group) it's just going to choose what it thinks is the default for that person, which is usually the email address listed first. |
H: Specify a range of text for Google Sheets Conditional Formatting
I would like Google Sheets to look at a column and highlight a cell red if it contains any of the letters A through M. My current solution is using a Custom Formula that looks like this =or(D4="a",D4="b",D4="c", and so on).
I'm wondering if anyone can think of a way to do it without so many arguments. To somehow specify the range of letters A through M.
AI: I know, I'll use regular expressions.
Conditional formatting (say, applied to the block A1:Z) with custom formula
=regexmatch(A1,"^[A-M]$")
highlights the cells with a single upper case letter from A to M. Similarly, the formula
=regexmatch(A1,"^[a-m]$")
matches lowercase a-m, and
=regexmatch(A1,"^[A-Ma-m]$")
matches either case.
Explanation
^ asserts position at the beginning of the string
[...] requires exactly one character from the specified character group
$ asserts position at the end of the string
Without ^ and $, the expression would match any string containing at least one character from the specified group. |
H: Create facebook ad for people who like specific group or page (targetting)?
I would like to boost a specific post and target people who liked a group or page that I do not own.
Can this be done or it's forbidden to prevent spam (or whatever)?
I used targeted advertising to create such group, but I was offered to (in/ex)clude people for my own page only.
AI: Yes, this can be done and there's no problem in doing it. Matter of fact, groups and pages are used as "Topics" when it comes to this, along with other pages and topics.
Lets suppose I have a pet shop and I want to target people who have interests for pets, I could target - pets, cat, dog, pet community, pet page. In this context, pet community and pet page become a Topic, and can be added as a target-public, targeting the people who liked this topic (meaning page or community) as a potential public.
I could even add - Google, Facebook or any other page or company as a target-public if I feel it's in context.
This is also one of the reasons why, when you create a page, you have the option to chose in what section will your page fit, whether it's in - sports, movies, comedy, entertainment, technology etc..., to fit in Topics, which will be used later in this concepts, and of course to have more chances to be found in an accurately search, among other things. |
H: This video has been removed by the user - add a redirect link
I deleted a video with the intent of replacing it with a newer version. Now, preexisting links are broken. Is there a way to redirect? Alternatively, is there a way to have a link to the new video, instead of just displaying this:
This video has been removed by the user.
AI: Unfortunately there's no possible way of redirecting a removed video. Once it's deleted, there's nothing we can do.
However if you haven't deleted the video, you could create a "replacing video" and create an annotation on the old one, letting people know that there's a new version of that video, like the example on this video: https://www.youtube.com/watch?v=2XK-oTUtFj4 |
H: How to add reference to calendar in Gmail?
I have received mails in Gmail which have reference to a date. As you can see in the picture with mouse hover, the add to calendar balloon appears.
The question is: how could I make this type of references to calendar?
AI: This requires no special formatting. It's Gmail using its natural language processing to find things that look like they could be a date.
I used a different email address to send myself the following message:
Let's get together on Tuesday.
Otherwise, let's shoot for the 15th.
I didn't use any special formatting. When I opened the message in Gmail with my regular account, this is what I got:
If you look close, "on Tuesday" has a dashed line under it. When I mouseover:
And then, when I click:
So there's no special formatting which needs to be done by the sender. |
H: How to clean up Sent Mail
I want to keep my Sent Mail folder (label would be more correct) clean, i.e. move done messages to some archive and keep only a few that remind me of something.
In the inbox I can do this by archiving an email. It is gone from the inbox but not deleted altogether. In the Sent Mail folder this doesn't work: when I archive a sent email the Sent Mail folder keeps listing it.
AI: Actually, Sent mail in Gmail isn't a folder nor a label. It's a system view similar to "All Mail".
The only way to remove messages from there is by deleting them.
Remarks (Update)
As @user829755 found some web pages suggests the use of IMAP client to remove messages from the Sent. According to bkc56 in Managing Sent Mail this could work temporarily but once Gmail refreshes the user mailbox index, the removed messages will appear in Sent again.
References
How can I clear Sent Folder. I have assigned emails to Labels. If I delete them out of Sent Mail it will delete all. - Gmail Help Forum |
H: How to move messages in "Social" or "Promotions" into "Primary"
I never remember how to do this. My e-mails are categorised in "Social" or "Promotions". I would like these e-mails to be organized into "Primary".
What is the easiest what to do this?
AI: Assuming you have a suitably modern browser simply drag the message from the message list and drop it on the tab where you'd like it to be organized for the future. (You should be prompted by Gmail whether or not you want future messages from the same sender to be added to the new category tab.)
If your browser doesn't allow for that, or if you want to move multiple conversations at a time, Inbox Categories are also listed with your custom labels in the "Move to" and "Labels" menus. Just check the messages you want to move and use the appropriate option.
More information from Gmail Support. |
H: Large amounts of spam, what should I do?
During the past week I've been receiving huge amounts of spam on my gmail account, something like 300 messages per 12 hours at its peak.
It all gets successfully filtered into my spam folder which I can promptly delete, so it's not like it's posing a threat to my using of the account, but I'd like an idea on how this could have happened and what, if anything, should be done about it. I could probably manage unsubscribing from them one by one over the course of a week, but is there a way to ensure that it doesn't just happen again in the future?
I am aware that this type of thing usually happens when you give out your e-mail publicly or to a fishy website, but the thing is I use this specific one for nothing but a few well known trusted sites such as facebook or twitter so I don't see where it could be coming from.
AI: If it's all correctly going to your spam folder there's nothing you should do. Google's anti-spam algorithms are working.
There are occasional bursts like this, where spammers find a new technique to get around some spam filters. It'll probably be short-lived. Once spam fighters upstream from Google put the kibosh on it and improve their filters and/or get the compromised gateway closed, it'll stop.
What you certainly shouldn't do is try to unsubscribe from obvious spam. Even if the sender honors on your request you've given them proof of a live address that other spammers can use. |
H: Google Sheets: COUNTIF with dynamic criteria
I would like to count the number of occurrences of a value in one sheet based on the value of a cell in another sheet.
I would like to use this formula:
COUNTIF(Sheet1!$A$2:$B:130, =A1)
Where A1 on this sheet holds the value that I want to look for and count in Sheet1. Of course that doesn't work. I can make it work by replacing =A1 with "=<the value that is in A1>" but there will be many COUNTIF() cells and I would rather not have to edit each to match the contents of the criterion cell.
AI: Right after posting the question I had a flash of inspiration…
It occurred to me that maybe I could construct the comparison string if there was a function that would concatenate strings together. Sure enough, there is a function called CONCAT that will do the trick.
So, I can do what I want with:
COUNTIF(Sheet1!$A$2:$B$130, CONCAT("=", A1)) |
H: Can I delete a GitHub fork before it's merged, or do I have to wait until after?
I forked a GitHub repo and submitted a Pull Request. But now my account still has a copy of the original repository.
Must I have that repo on my account enabled/present until the merge is done or I can delete it?
Since I don't plan to add more features it would be a waste of space.
AI: You must keep the forked repo around until the merge is done; otherwise, GitHub will not keep your changes.
Additionally, it isn't really a waste of space since GitHub allows unlimited open repos for no cost, and lesser used repos drop off the list of recently contributed repos on the front page, so you won't ever see it.
If you are talking about your local checkout of the fork, there is absolutely no need to keep that. All your changes are now stored on GitHub, so what you do with the local copy doesn't matter - just don't delete the repo on GitHub before the PR is merged. |
H: How to sort names in column alphabetically ignoring "The", "An" & "A"... and then pull names (skipping duplicates) into another tab
This is for a Movie Have/Want list using Google Sheets.
Problem 1:
Column A is the movie Title. I would like to be able to sort the movie titles alphabetically but ignore when a movie title begins with "The", "An" or "A". For example: "The Abyss" would be filed under 'A' for "Abyss" but would still display as "The Abyss".
I would also like it to ignore a few other words that I can continue to enter as needed. For example: "Marvel's"... So that "Marvel's Iron Man" would be filed under 'I' for "Iron Man" but would still display as "Marvel's Iron Man".
I know how to do it with this in a new column:
=IF(LEFT(A2,2)="A ",RIGHT(A2,LEN(A2)-2),IF(LEFT(A2,3)= "An ",RIGHT(A2,LEN(A2)-3),IF(LEFT(A2,4)="The ",RIGHT(A2, LEN(A2)-4),A2)))
Then I just sort by that column and hide it. Not really a very good solution but it works. However, with the additional things I want to do below, I'm guessing I'll need a script.
Problem 2:
I have all the movies we "Have" and all the movies we still "Want" in the same list. I have it this way because when we get a movie from our wanted list, all we have to do is change the entry in the "Ownership" column from "Want" to "Have".
I would like to make it so that the movies are sorted by default to first show movies we "Have" alphabetically and then movies we "Want" alphabetically but of course, it would still be nice not to be locked into that sorting default so that friends and family can sort as they like (by year, etc.) when browsing our catalog.
Problem 3:
I have two different tabs. The first tab has the movie title along with which edition it is, what format it is etc. So sometimes there may be multiple entries for the same movie. For example:
"The Abyss (Theatrical)" "1989" "DVD"
"The Abyss (Special Edition)" "1989" "DVD"
"The Abyss (Special Edition)" "1989" "Blu-ray"
"Alfie" "1966" "DVD"
"Alfie" "2004" "DVD"
I have a second tab that is simply a far-less info-filled count of all of the separate movies titles we have NOT counting duplicate movies. For Example: (Notice that The Abyss (Special Edition) is not listed twice like it is above.)
"The Abyss (Theatrical)" "1989"
"The Abyss (Special Edition)" "1989"
"Alfie" "1966"
"Alfie" "2004"
I would like to be able to pull all the movie titles and years (two different columns, perhaps even a third column) from the first tab and have them placed in the second tab automatically but skipping duplicates.
To complicate things even further, I would love to also be able to pull the color formatting of the titles from the first tab into the second tab as well if at all possible. I use color to distinguish between different versions of a film like remakes, etc.
Alternative to Problem 3:
I just thought of this alternative. The second tab is for a more simplified list but is mostly for counting purposes. It adds up all of our Haves and Wants and gives totals for each and an overall total. If there were a way to instead count the "Have" and "Want" entries but then compare them to the title and year columns so not to count duplicates, that might be fine as well. Perhaps not my preferred way to do it but if it makes the solution more possible, I'll take what I can get.
The first problem by itself is not that bad but with all the additional things I'm trying to accomplish, it's way beyond my ability.
AI: Database Software
I think Google Sheets can do this but do consider whether to use proper database software (Google for "database software"). Those will handle tables of data with more/easier high-level control. They won't have cell formulas that can get inconsistent between rows, or cells accidentally added outside of a desired range.
There are many choices of database programs and services. It sounds like a "flat file" manager would suffice, but a "relational database" is fine, too. See MySQL, MS Access, Google Fusion Tables, Zoho, etc. Some of these run as network services, and it's possible to set up MySQL running on an Amazon server or use Google's Cloud SQL.
Movie Collection Software
Potentially even better is to use polished movie collection software (Google for "movie collection software"). Those will have movie-specific features like automatically retrieving cover art and other info from IMDB, and auto-competing movie names when you type them in.
But using Google Sheets, you'll learn interesting skills that will be useful for other spreadsheets.
How to sort by simplified titles
You're on the right track by creating another column that has the simplified titles. But using lots of IF() expressions will get hard to manage. Better to use the regular expression features in Sheets functions or JavaScript regular expressions in an Apps script like this:
/**
* @OnlyCurrentDoc Limits the script to only accessing the current spreadsheet.
*/
/**
* Given an input value or range of values returns a value or a range less any prefix
* word "A" | "An" | "The" and less leading and trailing white space.
*/
function STRIP(input) {
if (input instanceof Array) {
// Recurse to process an array.
return input.map(STRIP);
} else if (typeof input == 'string') {
// Process as a single value.
var re = /^((A|An|The)\s+)?(.*)$/i; // "i" means case insensitive
return input.trim().replace(re, '$3');
}
// Return the input unchanged.
return input;
}
How to sort by title in two groups (owned, wanted)
Just ask Sheets to sort by the owned/wanted column and subsort by the simplified title column -- the first and second sort keys.
Note that if you have a function like =STRIP(A2:A1000) in cell B2 to set the range of values B2:B1000, if you then Sort the range, that may move the cell containing the formula so the formula no longer sets the desired cell values. You can work around that by putting the formula =STRIP(A1:A1000) in the table's title row, B1, and configuring sort with "Data has a header row". A1 contains "The Full Title", B1 will show "Full Title".
How to count groups
Try using the COUNTIFS() function for that.
How to filter
Check out the Filter and Filter View features and spreadsheet add-ons like EZ Query.
How to copy selected rows and their colors
You can write an Apps Script function to do this. See the Apps Script docs and tutorials for examples of writing a function that can run from a menu command and loop over selected cells or a named range. It can get properties like color from those rows as well as the text contents, decide which rows to copy, then store them in your second sheet.
See the Spreadsheet Service reference, e.g. how to get a cell's background color. |
H: Download attachment in Gmail that's falsely identified as 'Virus found'?
I intentionally saved something very sensitive among a lengthy text file named xxxx.dll and saved as an attachment in my Gmail inbox as an email. Now that I needed it and tried to download it, Gmail simply gave me a blank web page saying 'Virus found'.
What do I do now to get my file back? It's very important!
Even ironier was I used 'xxxx trojan horse' as the subject of that email. I thought I was so clever but eventually turned out so stupid! HELP ME!
P.S. Already tried to send the email to another of my email that probably isn't so strict in the security policy but it kept failing to send as Gmail seemed to be detecting it and refused to send!
AI: Good news - your data is still there, but you're going to have to jump through some hoops to get it back.
Open the email in Gmail, click on the arrow in the top-right corner of the email and choose "Show Original"
Somewhere in your email you're going to see a section that looks like this, followed by a wall of encoded text:
Copy all of that text (not including the headers) into your clipboard (Ctrl+C or Cmd+C)
Head on over to https://www.base64decode.org/ and paste the text that you copied into there (Ctrl+V or Cmd+V), and press "Decode"
Your original text will appear in the "Result goes here" box |
H: Dynamic generation of sheet name from cell content
Is it possible to dynamically change the name of a sheet in Google Sheets based on the contents of a specific cell? For instance, I'd like my sheet to get its name from whatever is in cell A1... is that possible at all?
AI: Here's a script that does this: enter it in Tools > Script Editor.
It runs automatically on every edit, and renames the active sheet if the content of A1 (referred by row 1, column 1) does not match the current sheet name.
function onEdit() {
var sheet = SpreadsheetApp.getActiveSheet();
var oldName = sheet.getName();
var newName = sheet.getRange(1,1).getValue();
if (newName.toString().length>0 && newName !== oldName) {
sheet.setName(newName);
}
}
That said, I think this is not a particularly good way of naming sheets. |
H: How to get the name of the row which is the mode in Google Spreadsheets?
Example:
A B
1 john 6
2 ryan 5
3 kate 8
4 paul 1
I want the formula that returns the text "kate" in A3, because the value in B3 is the highest in the range B1:B4. I would like to know also the same opperation but with the lowest value (i.e. B4 is the lowest, so I would get "paul").
AI: For the highest value you can use:
=INDEX(sort(A:B, 2, false), 1, 1)
This first sorts and then retrieves the value from the first row and column of the sorted data.
Using the opposite sort order in the formula will yield the lowest value:
=INDEX(sort(A:B, 2, true), 1, 1) |
H: Sorting alphabetically (A-Z) ignoring beginning "A", "An" and "The" using a script
I have a Movie list using Google Sheets that I would like do some sorting with using a script rather than a formula.
Column A is the movie Title. I would like to be able to sort the movie titles alphabetically but ignore when a movie title BEGINS with "A", "An" and "The". For example: "The Abyss" would be filed under 'A' for "Abyss" but would still display as "The Abyss".
I would also like it to ignore a few other words that I can continue to enter as needed. For example: "Marvel's"... So that "Marvel's Iron Man" would be filed under 'I' for "Iron Man" but would still display as "Marvel's Iron Man".
I know how to do it with this formula in a new column:
=IF(LEFT(A2,2)="A ",RIGHT(A2,LEN(A2)-2),
IF(LEFT(A2,3)= "An ",RIGHT(A2,LEN(A2)-3),
IF(LEFT(A2,4)="The ",RIGHT(A2, LEN(A2)-4),A2)
)
)
But I would rather do it through a script so that I don't need to use another column for this. When someone clicks to sort movie titles A-Z, it would be nice if it ignored "A", "An", and "The" without having to use an additional column of titles. It's less messy and takes up less space.
Also, if there is a way through the script for it to first sort by Movie Title and then by release Date by default, that would be great. But of course, it would still be nice not if it weren't locked into that sorting order so that friends and family can sort as they like (by year, etc.) when browsing our catalog. This is not as important of a feature, though.
AI: Managing expectations
Scripts cannot intercept a user's click on column name. This action will always invoke built-in search. So, if you want users to sort by clicking a column, you need a separate column for sorting.
With a separate column
You don't need a complex formula with IFs to remove articles or other words: a regular expression can be used to handle all variants at once:
= regexreplace(A1, "(?i)^(a|an|the) ", "")
(case-insensitive replacement), or
= regexreplace(lower(A1), "^(a|an|the) ", "")
(also converting to lowercase, so that the sorting is case-insensitive).
This is easily extended to other words: (a|an|the|Marvel's) and so on.
With a script, for formula-less sheets
But if you really don't want another column, here's a script. What it does:
Adds a "Sort > by Movie Title" command to the menu (when the spreadsheet is opened).
When invoked with this command, sorts entire sheet A>Z by the first column, ignoring beginning a, an, the and also ignoring case.
Does not sort by any other column (adding year, etc as a secondary criterion is up to you).
As a side effect, this script will remove any formulas from the sheet, replacing them with the current values in those cells. Which is unacceptable, unless you don't use formulas.
function sortByTitle() {
var range = SpreadsheetApp.getActiveSheet().getDataRange();
var values = range.getValues();
values.sort(function(a,b) {return (trimmed(a[0]) < trimmed(b[0]) ? -1 : 1);});
range.setValues(values);
}
function trimmed(str) {
return str.toLowerCase().replace(/^(a|an|the) /, '');
}
function onOpen() {
SpreadsheetApp.getActiveSpreadsheet().addMenu("Sort", [{name: "by Movie Title", functionName: "sortByTitle"}]);
}
With a script, preserving formulas
This is a hybrid approach: it adds a new column filled with trimmed titles, invokes the method sort of the Range class, then clears the column. As a result, formulas are preserved (if your formulas make relative references to cells in other rows, sorting will still mess things up, but this is to be expected).
Here is the new sortByTitle function; the functions trimmed and onOpen remain as above.
function sortByTitle() {
var sheet = SpreadsheetApp.getActiveSheet();
var height = sheet.getDataRange().getHeight();
var width = sheet.getDataRange().getWidth();
var titles = sheet.getRange(1, 1, height, 1).getValues();
trimmedTitles = [];
for (var i=0; i<titles.length; i++) {
trimmedTitles.push([trimmed(titles[i][0])]);
}
var newColumn = sheet.getRange(1, width+1, height, 1);
newColumn.setValues(trimmedTitles);
sheet.getRange(1, 1, height, width+1).sort(width+1); // see comment below
newColumn.clear();
}
If your spreadsheet contains a header row (which is likely), replace the line with the comment with
sheet.getRange(2, 1, height-1, width+1).sort(width+1);
so that the top row is excluded from sorting. |
H: Google Calendar: Quick Add Format
I am writing a script to send an email to my Google account which will in turn trigger IFTTT and use Google Calendar's Quick Add function to add the body of the email to my calendar. I seem to be having problems figuring out the correct format the entries need to be in order for quick add to correctly add an event.
I need the following attributes:
Event Summary
Start Date and Time
End Date and Time
Location
So far I managed to get the summary and location by sending a string in the form of Event XYZ at Location ABC but I am having trouble with the date format; I tried from and to, at and till, short date, long date, date first time first, etc. Any idea what the correct format is?
AI: It looks like the Quick Add parser isn't equipped to handle events that cross over midnight. As long as the event is in a single day, however, the hyphen works fine:
Dinner with Andre tomorrow 6p-9p
Dates work just as well:
Leftovers with Andre at Mom's 9/13 1:30p-3:30p
You can get things to cross over the "midnight barrier", but only if they're less than 24 hours. For instance:
Dessert with Andre 9/13 11p-3a
This will create an event that runs from 11:00 PM on September 13 to 3:00 AM on September 14.
What few tips there are for creating events with Quick Add can be found in Google Calendar Support: Create an Event. |
H: How to export photos and albums from Google Photos?
Do you know of a way to download photos and videos back from the new http://photos.google.com?
I was expecting at least some unofficial tools like Flickr downloader, but I couldn't find any.
I'm wary of using the service before I find out how to get data back in case of problems.
AI: Google Photos is one of the products included in Google Takeout. You can even select exactly which albums you want to download. It will take some time, but once the archive is ready you'll receive an email with a (private) link for you to download your data.
Albums will get their own folders within the archive. Photos not in albums appear to get put in folders based on date. Also, if the archive is too large for a single zip file, it will be broken up in to smaller chunks. (For me, each file was 2GB.) |
H: How do Gmail folders work?
I'm trying to write a script for someone in Email for Google Apps, and I thought I knew how folders worked in it. (Every email was in the inbox, and other folders were just filters looking at the inbox.) But this person's Gmail has emails in his folders without the [inbox] label.
Can someone explain to me how that's possible, and how Gmail folders really work?
AI: Gmail doesn't have folders. It has labels.
Labels are essentially "tags" that can be applied to a conversation. A conversation can have multiple labels on it. Or none.
"Inbox" is a special label, but it's still just a label. "Archive" removes the "Inbox" label from a conversation. There are other special labels too: "Spam" and "Trash". "All Mail" and "Sent" aren't labels, although they act a bit like them. And, of course, you can create almost as many labels as you want.
You can learn more about labels from Gmail Support. |
H: Why I cannot paste images from Snagit to Gmail?
I am using SnagIt to copy images, but when I paste in Gmail the image does not show. What to do?
I tried this solution described here: http://www.itcentralpoint.com/fix-snagit-correctly-paste-images-gmail but it doesn't help. It is for previous versions of Snagit, and now it is not working any more.
AI: I see that it is impossible to copy images from SnagIt when they have a transparent background. It happens in some effects (for example drop shadow).
To fix it go to editor settings, in the file menu:
Then disable image transparency:
It solved the issue for me. |
H: How to sort by date with Google Spreadsheet?
Consider the following text in a single column in a spreadsheet:
AAPL 2015 Dec 18 C @ 185.000
AAPL 2016 Mar 18 C @ 160.000
...
How to sort by date?
I tried extracting the date using regex, but it is a lot of work to convert that to a date object.
AI: Extracting the date with regex, and converting the result with datevalue isn't that much work:
=datevalue(regexreplace(A2, "^\w* (\d+) (\w+) (\d+).*", "$1-$2-$3"))
Then sort by this new column.
Explanation: the three captured groups in the regex are the year, month, and day. The whole string gets replaced by year-month-day, which isn't quite ISO standard (month is in text) but is clear enough for datevalue to convert correctly. |
H: Does deleting a playlist on YouTube also delete the videos?
I want to delete a playlist from my account, but I still want the videos attached to my account. Does deleting a playlist on YouTube also delete the videos?
AI: Deleting a playlist on YouTube does not delete the videos in that particular playlist. |
H: Google Doc: Cannot edit multi-paragraph selection
I find the Research mechanism built into Google Docs quite useful when researching and documenting some activity. However, there is one impediment that is wasting my energy since I have to workaround it more often than I think is reasonable. This is that dragging URLs from the Research list over into the document results in URLs whose text (not URL) is not editable. Google Docs disables editing of the text associated with the URL with a "Cannot edit multi-paragraph selection".
This is an issue because this action of dragging links into the document, and then needing to cleanup/edit the text of the link (not the URL) is a frequently occurring activity.
Steps to reproduce (See browser info at the end of this question):
Create a new Google Doc
Select the Tools/Research menu item:
In the Research search entry field type how do I find the kernel version ubuntu and hit return.
Click and drag the first URL you see into the document:
On the URL in the document you just dragged, left mouse click to produce the popup with the Change link, then click that Change link:
In the text field, you see the Cannot edit multi-paragraph selection.:
At this point, I'm stuck.
How do I get rid of that multi-paragraph formatting without having to waste time doing these steps:
Right mouse click in the Research panel on the URL, and select Copy URL (browser dependent).
Copy the URL out of the text field.
Click in the document somewhere other than in that broken URL.
Type CTRL-k to insert a new URL.
Type CTRL-v to paste the URL.
Left mouse click in the text field to provide the new text
Press Return.
Select the multi-parapraph infected URL.
Press Delete.
Ideally, there would be a way to change the way drag and drop works to not include this "multi-paragraph baggage" in the drag.
This is reproducible on two completely different operating systems but using same versions of the browser, Firefox (BTW, suggesting I change browsers is not a viable option due to my dependence upon many Firefox extensions):
32-bit Firefox running on 64-bit Debian Linux system: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
64-bit Firefox running on a 64-bit Windows 7 Professional system: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 Profile
AI: Instead of using drag and drop,
Do a mouse hovering over the research result. Three buttons should be displayed
Click in the "Insert link" button. |
H: How to add a location label (like starring) to Google Maps (website), like in the 2015 updated Android app?
At some point in 2015 I believe Google Maps on Android added the ability to add a label to any location from the vertical ... menu when a location is selected. This label is saved in your account - similar to Starring locations (I think it replaces starring locations, I don't seem to be able to star locations in the app any more).
I can't find the equivalent feature in the Google Maps website.
How do I add this new type of label which is saved to my account?
I've tried searching but I just get results for old-google-maps APIs, map maker tools, embedded maps and similar. I'm looking for plain regular labels.
Also, possibly related, "Labels" that I created on my phone app don't seem to show up while I'm logged in as the same user on the website. All the same starred locations show up - but not labels (and it doesn't seem to still be possible to add starred locations on the Android app). I'm confused as to whether this is a feature where the website version failed to keep up with the apps, or whether I need to enable something, or some other reason for the mismatch.
AI: From what I can see, Google is not currently sharing all that data between the Android Maps app and the Google Maps website. I thought perhaps it would show under "My Maps", but no such luck.
However, if you search in the Google Maps website for a label that you've created, it will get found. It doesn't otherwise show your label, however, nor do I see a way to create labels from the Maps website.
I also found this from Gizmodo
The feature doesn’t look quite finished yet—your changes don’t appear on the web...
so perhaps it's not yet fully baked. Maybe in a month or two this can be re-visited. |
H: How can I have two-way sync between Dropbox 'Camera uploads' and my phone?
When I take a photo using my phone, it is automatically uploaded to 'Camera Uploads' folder in my Dropbox.
But when I delete the photo from my phone, it is still in the Dropbox folder.
Is there any way that deleted files (in my phone) will be removed from my Dropbox folder automatically?
AI: The Dropbox "Camera Uploads" feature doesn't work that way. What it does is, when you take a photo, it copies the file to the "Camera Uploads" folder in Dropbox, which then syncs to your Dropbox account like any other file.
It's a way to backup your photos, so that if something were to happen to the photo on your phone you'd still have the Dropbox copy. Or, more likely, you can confidently clear the photos on your phone (maybe because you're low on storage) knowing that you have a copy of it safely in the cloud.
There's no way to automatically remove a photo from "Camera Uploads" if deleted from your camera roll. (This is something that's bitten me once or twice. I use Dropbox, Google Photos, and Facebook to automatically grab my photos. It makes it a bit of a challenge to get rid of those photos of the inside of a pocket.) |
H: Select the 'earliest n' or 'latest n' entries of a subset in google spreadsheets
I'm trying to make a trading log for Eve Online and I need to keep track of average sale prices for arbitrary items. I do a sum of FILTER results to find the total cost of all of a particular item and then divide by the count to find the average. The problem is, I want to keep a more accurate rolling average of my current stock only, i.e. I want to only use the latest N entries from my FILTER results, where N is number bought minus number sold. Conversely, when calculating profit it would be more accurate to only count entries which have already been sold, i.e. the earliest ones.
Is there a way to do this? The only way I could think of would be using a for loop to count backwards from the end of the list, but I don't know how to do that in a spreadsheet. These are the formula I'm currently using:
Item
=UNIQUE(B3:B)
Bought
=SUM(FILTER( D:D , B:B = Q3))
Sold
=SUM(FILTER( L:L , J:J = Q3))
In Stock
=R3-S3
Avg. Buy Value
=ArrayFormula(SUM(IFERROR(VALUE(REGEXREPLACE(FILTER( E:E , B:B = Q3)," ISK","")))))/R3
Avg. Sell Value
=ArrayFormula(SUM(IFERROR(VALUE(REGEXREPLACE(FILTER( M:M , J:J = Q3)," ISK","")))))/S3
Avg. Profit
=V3+U3
Total Profit
=W3*S3
Avg ROI
=-W3/U3
AI: While filter is intuitive, query is a more powerful tool, and is better suited for your task.
Suppose A has the timestamp, B the type of product, and C the data you want to average. The command
=query(A:C, "select C where B = 'ProductName' order by A desc limit 10")
selects 10 most recent transactions for the given product name. If you want to average these, put the average around the command:
=average(query(A:C, "select C where B = 'ProductName' order by A desc limit 10"))
To take the 10 oldest instead of 10 newest, change desc (descending) to asc (ascending).
To use the product name contained in another cell (e.g., F1), insert it by concatenation:
=average(query(A:C, "select C where B = '"&F1&"' order by A desc limit 10")) |
H: "Parameter X Value Y is out of range" being returned by INDEX combined with RANDBETWEEN
I'm making a random team selector but I'm getting a #NUM! error saying that "Parameter 2 Value 20" or "Parameter 2 Value 25" is out of range. From what I understand, they are not.
The parameters referred by the function are in other sheets.. Here is the link to it. Example:
Do you think this is a bug or am I doing something wrong?
AI: I see commands like
=index(Spain!A$2:A$19, randbetween(2,19))
The second parameter of index is not the absolute row number but is relative to the range specified as the first argument. For example,
=index(A$2:A$19, 1) refers to A2
=index(A$2:A$19, 18) refers to A19
=index(A$2:A$19, 19) throws an error
To fix this, either change the range of randbetween:
=index(Spain!A$2:A$19, randbetween(1,18))
or, if you want to refer by absolute row numbers, use indirect:
=indirect("Spain!A"&randbetween(2,19)) |
H: What can cause Facebook to ignore Open Graph tags?
I have a Wordpress blog. I have tested three different ways (three plugins) that adds Open Graph tags to each my post. I have browsed source of my page many times. Everthing seems fine. Example:
<!-- Jetpack Open Graph Tags -->
<meta property="og:type" content="article" />
<meta property="og:title" content="Some Title" />
<meta property="og:url" content="http://blog.com/some-title/" />
<meta property="og:description" content="Some Description" />
<meta property="article:published_time" content="2011-06-06T09:19:45+00:00" />
<meta property="article:modified_time" content="2015-09-15T10:31:57+00:00" />
<meta property="og:site_name" content="blog.com" />
<meta property="og:image" content="http://blog.com/files/2011/06/Rees.jpg" />
<meta property="og:image:width" content="1024" />
<meta property="og:image:height" content="650" />
<meta name="twitter:image" content="http://blog.com/files/2011/06/Rees.jpg?w=640" />
<meta name="twitter:card" content="summary_large_image" />
And... nothing. No matter, what I try to do, Facebook keeps displaying only title and description and there is no way I can force it to display image along with it.
Is there anything, I'm doing wrong or missing something?
EDIT: This is specific to a particular blog and to Facebook only. I can share the very same blog post on Twitter or Google+ and -- of course -- image appears. I can post a link from any other blog and it -- again -- works fine and appears on Facebook with proper image.
AI: Here's an amazing tool... It's the Facebook "Debugger". It shows you how Facebook sees your page, including any errors it detects.
Debugger - Facebook for Developers |
H: Iterative sums in google sheets
Continuation of my previous question.
I would like to calculate an average item cost for a trading log, using only the most recent number of items equal to the number in stock. Currently, I'm only averaging over all purchase history, which is inaccurate in the event of price fluctuation.
Here is an example of two sales. Assume I've bought 5 and sold 3, leaving me with a stock of 2.
Date and Time Item List price Count Sale Currency Client
2015.09.14 05:29 Fleeting Propulsion Inhibitor I 1,903,008.01 ISK 4 -7,612,032.04 ISK ISK xxxx
2015.09.14 07:27 Fleeting Propulsion Inhibitor I 1,903,008.01 ISK 1 -1,903,008.01 ISK ISK xxxx
I want to count the second (latest) entry, but only 1/4 of the first entry.
If each sale was for only a single item, I could simply read the latest number of entries equal to my stock. This was what I asked in my last question, and this was my solution (where Q1 is the item name and T1 is current stock:
=ARRAYFORMULA(SUM(VALUE(REGEXREPLACE(query(A:E, "select E where B = '"&Q1&"' order by A desc limit "&VALUE(T1)&"")," ISK",""))))
I figure an iterative sum of the 'count' column up to the stock number is the best way to do this, but I don't know if that's possible.
AI: This is quite a natural problem, but I couldn't think of an easy solution without creating some extra columns. I suggest a custom function such as partialTotal below. Its parameters are:
The range of data to process
The number of items you want to add
The number of the column containing counts (relative to the range)
The number of the column containing quantity to be totaled (relative to the range)
Whether to take the latest data (bottom rows): true or false.
Example: suppose you have the following in the columns B:E, and you want to total the sales for the last 8 items of type "want".
+-------+-------+-------+------+
| Item | Price | Count | Sale |
+-------+-------+-------+------+
| stuff | 9 | 8 | 11 |
| want | 8 | 7 | 22 |
| want | 9 | 6 | 33 |
| stuff | 8 | 5 | 44 |
| want | 9 | 4 | 55 |
| stuff | 8 | 3 | 66 |
+-------+-------+-------+------+
The command would be
=partialTotal(filter(B2:E, B2:B="want"), 8, 3, 4, true)
where filtering happens first, and then totaling: take 8 items, counts are in the 3rd column (within the range), quantities to total are in the 4th column, and latest are wanted. The output is 77, which is 55 + 33*(4/6).
Here is the code of the custom function, to be placed in Tools > Script Editor.
function partialTotal(data,count,countColumn,quantityColumn,latest) {
if (latest) {
data.reverse();
}
var total = 0;
var i = 0;
while (count>0 && i<data.length) {
if (data[i][countColumn-1] <= count) {
total = total + data[i][quantityColumn-1];
count = count - data[i][countColumn-1];
}
else {
total = total + data[i][quantityColumn-1]*count/data[i][countColumn-1];
count = 0;
}
i++;
}
return total;
} |
H: How to share a Google Doc on Google Drive using an existing URL?
I have seen that for file types not native to Google Drive there is the option to "manage versions" so that if I have shared the URL for a specific file on my drive with everyone, I can upload a new version and use manage versions to replace the existing file being shared by the eisting URL with my newer file.
What about for native Google Drive files? I have written a Google Docs document, shared it, I made a copy which I hvae been revising and updating, now I want the existing URL I shared with everyone to point to the updated version.
Is this possible, how?
AI: At this time that is not possible. One alternative is to do the following:
Use two tabs or windows, each one to open the old document and the other to open the new document with the updated content.
In the new document copy all the updated content.
Go to the old document, select all, then paste the content.
If you change the updated document settings, like page margins or background, you will have to apply them to new document manually. |
H: Changing all occurrences of one label to another when there is more than one page of results
How do I change all occurrences of one label to another? From the Gmail screen I can do this for the 100 messages displayed, but I have several screens of messages.
In a traditional mail program, I would say I'm trying to move all messages in one folder to another.
AI: Go into Label A and click the checkbox within the Select button to select all of the messages on the page.
Look above the first message but below the action buttons, and you should see a notification that reads All 100 conversations on this page are selected. Select all [X] conversations in "Label A". The second sentence is a link....
Click the link in the notification, and all of the messages you have in "Label A" should be selected, including those beyond the first page. (The notification will change to reflect this.)
Click the Move to button---with the folder icon---above the message list and either click on "Label B" or, if it does not yet exist, click Create new below the labels list and enter "Label B."
Alternatively, you can use the Labels button to add Label B to your messages on top of Label A or give your current Label A messages any combination of labels. |
H: Inbox by Gmail -- how to print entire conversation?
I'm using Inbox by Gmail and want to print an entire conversation of about 50 emails. I can't find the button for printing the entire conversation (group of emails). Any hint?
AI: Unfortunately, there is currently no way to print an entire conversation from Inbox. All you can do is print individual messages.
You'll need to switch to regular Gmail to print the whole conversation.
I suppose this is not surprising, since Inbox is still in Preview. You should use the "Feedback" option to let Google know that this is an important feature. Perhaps they'll prioritize it for the next set of enhancements. |
H: In Google Sheets' filter views, can I filter columns non-cumulatively?
I have been putting together a spreadsheet in Google Sheets that includes various data/information relating to the hundreds of characters in a novel I am reading. Two of the columns relate to the chapters that a given character, respectively, 1) actually appears in, and 2) is just mentioned in. (The data within this column, while technically numerical, is formatted as plain text.) As a way of allowing a user more easily to find the row for a specific character that they come across while reading, I have been attempting to utilize the new Google Sheets feature of filter views to show only rows/characters who appear or are mentioned within different ranges of chapters ("acts").
The other day, I discovered that filter views (and filters in general) are cumulative, so if I specify certain sets of chapters to display within the "Appearances" column, when I go to specify the sets to display within the "Mentions" column, I can only select those in rows whose "Appearances" values were specified.
I want a filter view to display rows for characters who appeared OR were mentioned in a given range of chapters. But filter views operate under "AND" logic. Is there a way to get filter views to display all of the rows I want them to, given my parameters? Or is there an alternate method of accomplishing this, perhaps using formulae?
(I did scour Google's documentation for possible alternatives---the REGEXMATCH formula seemed particularly useful for my purpose, though I am not sure how I would implement it.)
AI: Instead of filter views, I would use the filter command. For example, suppose Sheet1 holds raw data, with A being a character, B the list of "mentioned" chapters, and C the list of "appeared" chapters. You can then add another sheet for "filtered" data, where the user enters chapter number in, e.g., cell A1 and immediately get the list of rows matching that number thanks to the command
=filter(Sheet1!A2:C, regexmatch(Sheet1!B2:B,"\b"&A1&"\b") + regexmatch(Sheet1!C2:C,"\b"&A1&"\b"))
Here, each regexmatch scans its column (B or C) paying attention to word boundaries (\b) so that, e.g., "20,23,25" would not match "3". Addition plays the role of OR operator here.
If you are sharing this, you can allow editing but protect all cells except A1 on the second sheet: this way, the users can only change the chapter number for filtering.
There is a potential drawback: the changes to A1 are actual edits; i.e., what one user does affects everyone. If this is unacceptable, then filter views are the only option. You can circumvent the "OR" issue by creating a new column with
=B2&","C2
i.e., concatenation of columns B and C. Then apply filter views based on that column. However, the filter view will require either
custom formula with regexmatch as above (not user-friendly at all)
different format of data to make the condition "text contains..." work: for example, you could format as ,2,4,10,13,16, so that the text to search for would be ,4, (Otherwise, there's the same issue of "13" matching "3".) |
H: Has Imgur stopped giving direct links?
Has Imgur stopped giving direct file links to images uploaded?
I can't see a direct file link to this image: https://i.stack.imgur.com/U5BeX.jpg
(I know that the Stack Exchange website still integrates with Imgur, and gets a direct link, but I'm not asking about that.)
AI: The link is in the "Share this image" menu on the right, just click "More" |
H: Using Filter formula to display cells starting with a specific number
In my Google spreadsheet I have data which updates automatically. I need to see only cells which start with 1. I have used filter but it didn't workout as after each update filter doesn't update so I am getting wrong values (not only those which start with 1). I know that Filter formula can help me but I don't know how to specify "starts with 1" in it. Please let me know if you have any ideas.
AI: In order to capture only cells starting with 1, you will need to use the REGEXMATCH formula.
(Let's assume you wanted to filter columns A and B, based on whether or not the data in A starts with 1.)
=FILTER(A:B,REGEXMATCH(A:A,"^1"))
The "^1" is a regular expression that captures strings that contain 1 as their first characters.
However, this only works on strings of text, so if your data is numerical, you will need to use the TEXT function in the range argument of your REGEXMATCH to convert the data into text.
=FILTER(A:B,REGEXMATCH(TEXT(A:A,0),"^1")) |
H: Twitter 'confirm email' message won't go away after trying everything I could find online to try
Two other people on this forum have asked this question and I have tried the advice given in both responses, but it still won't work for me. I've searched everywhere else online and cannot find any other information regarding this issue.
I am a new twitter user. After creating my account, a yellow message appears asking me to confirm my email address. I go to my email and hit the "confirm" button. Then my twitter opens in a new window and the message is still there. I've signed in and signed out, resent, tried again. Still there. I've cleared my browser history, tried different browsers, waited a few days, resent and hit the confirm email button after trying each of these things and still the message is there.
I sent a message to Twitter regarding the issue but it says that they don't respond to individual emails. I'm not sure what else to do or what I am doing wrong. Would greatly appreciate anyone's help on this.
AI: From the Help Center:
I'm having trouble confirming my email address
Nothing is working. Help!
If you’ve tried resending the email and you are still having trouble, here are some troubleshooting tips:
Are we sending it to the wrong email address? Double check your Account settings to make sure your email is entered accurately. See any typos? Do we have an old email on file? Make any necessary corrections and click save; we’ll send another email if you’ve updated the address.
Try changing the email address to an email address with a large domain (Gmail, Yahoo, etc.). We tend to have more success delivering emails to those types of domains.
Still need help? Contact us here. |
H: How to not notify fans when posting on my Facebook page?
I have old stuff to post on my Facebook page and I would like my "fans" not to be notified about it.
Is it possible ?
AI: A Facebook page is a public profile, so anytime you post anything on page it will be visible to page 'fans'. If you want 'fans' did not get notify just unpublish your page.
Published Page is visible to the public. Unpublished Page is only visible to the people who manage the Page. Unpublishing your Page will hide it from the public, including the people who like your Page.
To unpublish your Page:
Click Settings at the top of your Page.
Click Page Visibility.
Click to check the box next to Unpublish Page.
Click Save Changes.
Your Page won't be visible to the public until you publish it again.
Note: You'll need to be an admin to unpublish your Page. |
H: Can I borrow an E-book via my Amazon Prime membership without a Kindle reader device?
So I have an Amazon Prime membership which includes one borrowing one E-Book from the Kindle shop per month. I don't have a Kindle reader, however since there are several other options to read kindle books (Cloud reader, Kindle desktop & Android app), I don't see why I shouldn't be able to use it. However, I can't seem to find any way to make use of that Prime feature. The store pages for Kindle books only offer me to buy them or sign up for a Kindle unlimited offer. I have tried the Amazon android app and the kindle app as well, to no avail. So here are my questions:
Can I borrow one book a month, as included in my Amazon Prime membership, without owning a Kindle reader device?
If so, how? I can access the Amazon web store, have the desktop kindle app installed on my PC and the Amazon app and Amazon kindle app on my android phone.
If so, can I borrow any e-book that is available via Amazon or only select from some fraction of them?
AI: I just did some research as a fellow Prime member, and it appears that you are referring to the Kindle First program, as the only other Prime-related eBook service is the Kindle Lending Library, which is only available to actual Kindle owners.
Kindle First allows you to purchase (indefinitely add to your Kindle library) for free one eBook per month.
To view the available eBooks and add one to your Kindle library, visit the Kindle First homepage. You can access it at any time via any Kindle app on any device.
And, of course, the catch: Kindle First is a service that lets Prime members add a single eBook from a list of six possibilities; however, all six books will not be released to the general public until the following month. This means that you get to enjoy a book up to a month before much of the world. |
H: "getAs()" error - send an email with attachment using Google Apps Script
I am very new to Google Apps Script and struggling. Here is my problem: Trying to send multiple emails via spreadsheet. Want to attach a PDF to those mails. Getting the following error:
TypeError: Cannot call method "getAs" of undefined.
This is the code (primarily taken from Send an email with attachment using Google Apps Script):
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getRange(1, 2);
var subject = range.getValues();
var range = sheet.getRange(1, 9);
var numRows = range.getValues();
var startRow = 4;
var dataRange = sheet.getRange(startRow, 1, numRows,9 )
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
var emailAddress = row[0];
var message = row[8];
var file = DriveApp.getFilesByName('PPT A4.pdf');
MailApp.sendEmail(emailAddress, subject, message, {
name: 'Automatic Emailer Script',
attachments: [file[0].getAs(MimeType.PDF)]
});
}
}
What am I doing wrong?
AI: The method DriveApp.getFilesByName returns a file iterator, not an array. This is why file[0] is undefined. Use file.next() (after checking that file.hasNext() is true; if it's false then there is no file with that name). |
H: Filter and subtotal by month
So I'm trying to do three things that are related to each other that I'm struggling to figure out:
I'd like to filter an entire column (B) based on a the month (let's say April), while maintaining the format of month/day/year. Is this possible?
Once I accomplish the above, I would like to be able to display subtotals based off of this filtering in my yellow (J26) and green (K26) cells. So if the filtering is done right, the J26, and K26 boxes should display subtotals for the month of April.
Then (I know I'm being a bit ambitious) I also want a complete separate sheet to reference subtotals for the month of April to help me estimate cash flow. Not sure if this is possible or not.
AI: You don't want to filter the whole column if you need subtotals somewhere below the data. If you filtered the whole column, the subtotal row would be filtered out. So, to filter the data for April:
Select your data table
Data > Filter
Small arrow by the header of the needed column > Filter by condition... > Custom formula is > enter this formula: =month(A2)=4 > then OK
(My dates are in column A)
For subtotals just use the formula below your data like this: =subtotal(9,D2:D7)
In a separate sheet I would use a formula which is not dependent on the filter, like this:
=sum(arrayformula(Sheet1!D2:D7*(month(Sheet1!A2:A7)=4)))
If your sheet name consists of several words use commas when referencing it like this:
'My data'!A2:A7 |
H: In e-mail from Google Sheets including image for signature takes out formatting of message
Sending emails from Google Sheets I have a compiled text (with line breaks) which is stored in var message. I have been trying to include a picture for the signature. To display it, I used the HTML body in the options parameter (as suggested here). This is the code:
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getRange(1, 2); // Fetch the range of cells B1:B1
var subject = range.getValues(); // Fetch value for subject line from above range
var range = sheet.getRange(1, 9); // Fetch the range of cells I1:I1
var numRows = range.getValues(); // Fetch value for number of emails from above range
var startRow = 4; // First row of data to process
var dataRange = sheet.getRange(startRow, 1, numRows,9 ) // Fetch the range of cells A4:I_
var data = dataRange.getValues(); // Fetch values for each row in the Range.
var googleLogoUrl = "http://die-masterarbeit.de/media/grafik/logo.png";
var googleLogoBlob = UrlFetchApp
.fetch(googleLogoUrl)
.getBlob()
.setName("googleLogoBlob");
for (i in data) {
var row = data[i];
var emailAddress = row[0]; // First column
var message = row[8]; // Ninth column
MailApp.sendEmail(emailAddress,
subject,
message,
{
name: 'Peter Peschel',
htmlBody: "<img src='cid:googleLogo'>",
inlineImages:
{
googleLogo: googleLogoBlob,
}
})};
}
What happens is that the message variable is not displayed at all. I have experimented in calling on the message variable in the htmlbody again, but this completely takes out the formatting (especially line breaks) of the message.
MailApp.sendEmail(emailAddress,
subject,
message,
{
name: 'Peter Peschel',
htmlBody: message + "<img src='cid:googleLogo'>",
inlineImages:
{
googleLogo: googleLogoBlob,
},
})};
}
Any suggestions on how to best display the image while keeping the formatting of the message?
AI: You are using the format sendEmail(recipient, subject, body, options) of the MailApp.sendEmail method. As the documentation says, if options include htmlBody, it will be used instead of the body parameter. This is why your first attempt ignored "message".
Since you need to send an HTML message, its content must be formatted as HTML; in particular, line breaks should be <br> instead of the control character \n.
Solution: replace \n with <br> in the message body. Here is an example of a script sending the content of cell A1. It provides plainMessage in case the recipient's email client does not render HTML, and htmlMessage with inline image
function sendA1() {
var plainMessage = SpreadsheetApp.getActiveSheet().getRange(1,1).getValue();
var htmlMessage = message.replace(/\n/g, '<br>') + "<img src='cid:googleLogo'>";
MailApp.sendEmail('user@domain.com', 'my subject', plainMessage, {
htmlBody: message,
inlineImages:
{
googleLogo: googleLogoBlob
}
});
}
By the way, since you are using options extensively, it would make sense to switch to the format sendEmail(message) where message is an object holding all the parameters. This makes for a more readable code:
MailApp.sendEmail({
to: 'user@domain.com',
subject: 'my subject',
body: plainMessage,
htmlBody: message,
inlineImages:
{
googleLogo: googleLogoBlob
}
}); |
H: Change Google account name
How to change Google account name?
I was trying to find answer with Google, but got many not actual information since Google has done many changes in its user interface.
AI: Editing your profile name in Google+ will change your name in all the
Google products you use for this account.
Go to your Google+ profile page
Click on your name
Change your name
More on create or change your Google+ profile name |
H: What are the different work statuses on Facebook?
I've recently seen this in the "About" section of a Facebook profile.
It links to a "Work Status" page which looks official (but is it?).
Are there any other work statuses and are they listed anywhere? It would be nice to have a complete list.
AI: A work status defines someone's job or occupation of the day if it doesn't involve a company.
It appears that they were widely used by the community under some "Interest" or "Community" pages and were finally merged and sorted by Facebook under a more descent category, "Work status".
I didn't find a complete list but stumbled upon some of them.
Unemployed
Not Yet Working
Stay-at-home parent
Retired
Self-employed
Work From Home (synonym page: Remote work)
Student
None
And their respective icons:
Feel free to complete the list. |
H: Google drive keeps deleted files/folders (as seen in webapp)
So. I've reorganized directory structure in gdrive folder. On local PC everything is good. But in web application, old directory structure remains with overlapped new directory structure (tho, files that were moved to other, new, folders, are left where they were)
Say, I had folder named 1, I created folder 2 inside it and moved all files from 1 to it. also added some new files in 1 and 2. Now directory 2 appeared, but files from 1 are not moved. New files are added to 1 and 2. Also i removed some files completely, but they are still where they were in webapp.
Dropbox handles this as expected.
UPDATE:
At first, question was, is it standard behavior. But now, when it've become obvious, that this behavior is abnormal, question is: how to fix it.
AI: One reason this could happen is if Google Drive sync is stuck or not even running on your computer.
Check to see if the Drive Sync icon is visible in the system tray on Windows, or the menu bar on Mac, or wherever it appears on Linux. If not, start it up.
If it is visible, check if it shows sync errors. Often the easy way to fix that is to make it exit, then start it up again. Or reboot.
Edit: If this is happening while GDrive says "Sync complete", then something's wrong.
Have you exceeded your GDrive storage limit? (See the summary in the lower left of the Google Drive web page, or click its Gear icon then open its Settings window.)
Otherwise, it sounds like a bug to report. Click the Gear icon > Help > Send Feedback. |
H: Filter based on Data Validation drop down list
So I have a two part question that involves filtering a column based off of both data validation drop down lists, and dates.
The problem for me is to create a filter that will give me a subtotal based off both the month and the expense/fixed asset columns, then apply it to the subtotal cell J25. Someone earlier had showed me how to do it by month, but I'm also interested in applying both filters. I've looked through the function list, and can't seem to figure this out.
Afterwards, I'd like to take that subtotal and apply it into another sheet that contains cash flow information. If I know how to do the above, I can probably figure this part out. But I figure I might as well ask anyways.
AI: Okay so I solved this problem with this function:
=sum(filter(J6:J25,K6:K25="Meals",month(B6:B27)=7))
This would give me the subtotal for all Meal expenses for the month of July. This is a bit of a pain to apply when referencing this data in other sheets, but it works. |
H: Running one of two queries based on the content of a cell
I have a query which works on certain condition
query1 =query('KEY WORK'!A1:I200,"select A,B,C,D where E = '"&B8&"' and A = '"&B4&"' and I = FALSE",)
query2 =query('KEY WORK'!A1:I200,"select A,B,C,D where E = '"&B8&"' and A = '"&B4&"' and I = TRUE",)
Now My problem is that I want to use if function and it should be like this:
=if(B4="ALL" then run Query1 else Query2)
AI: Use the IF command when forming the query string.
query1 =query('KEY WORK'!A1:I200, "select A,B,C,D where E = '"&B8&"' and A = '"&B4&"' and I = "&if(B4="ALL", "FALSE", "TRUE"))
The second parameter of query is just a string that you can form using whatever spreadsheet logic is available for string formation. |
H: Change bullet values in Gmail
I'm aware of the Gmail shortcuts for adding numbered and object bullets. Is there a way to increase the number of a bullet? For example, if I use Ctrl+Shift+7 to start a numbered list, then add bullets under the first item, the second main item is reset to 1.
Is there anyway to tell Gmail to "Continue Counting" like in Microsoft Word?
What I want:
Hardware store
Bug spray
Saw blade
Grocery store
Beer
more beer
What actually happens:
1. Hardware store
- Bug spray
- Saw blade
1. Liquor store
- Beer
- more beer
AI: Yes, it's possible. The key is to indent the bulleted items so that they become a "sub-list" under the numbered list. If you just hit Enter and convert it to a bulleted list, it becomes a new list, then when you go back to a numbered list it's treated as another new list.
Ctrl+] is the keyboard shortcut to indent. Ctrl+Shift+8 is the shortcut for bulleted list.
Let me see if I can illustrate in steps.
Step 1
Start your list
Hardware store
Bug spray
Step 2
Indent the item just created (Ctrl+])
Hardware store
Bug spray
Step 3
Convert to a bulleted list (Ctrl+Shift+8)
Hardware store
Bug spray
Step 4
Continue down to your next numbered item
Hardware store
Bug spray
Saw blade
Grocery store
Step 5
Outdent to make it part of the "super" list. (Ctrl+[)
Hardware store
Bug spray
Saw blade
Grocery store
Continue as necessary. |
H: How do I transfer ownership without deleting files for everyone?
I shared a folder of pictures with someone. I set them as owner. I then deleted the folder. It was deleted for them as well.
Google's Help docs claim that transferring ownership of files actually gives them the files. But this is clearly not the case.
What exactly does being owner mean if it doesn't stop someone else from deleting your files?
And how do I actually transfer files to someone else so I can delete them out of my own Google Drive?
AI: According to the Google Help Center:
When you transfer ownership of a folder from yourself to another person, the new owner of the folder becomes an editor of the files in that folder. The original owners of the files remain the owners, and if the original owner deletes a file, it'll be removed from the folder.
If you just transferred ownership of the folder, and not the individual files within, then you were still the owner of the original files within the folder. Thus, if you deleted a file, it would be deleted for everyone. |
H: Is there a way to control the number of seconds by which to forward/rewind a YouTube video?
By pressing j or l on your keyboard, you can forward/rewind a YouTube video by 10 sec. But sometimes I need the ability to forward or rewind it by 3 sec, 5 sec, etc. Is there a way to control this?
EDIT: I'm on Win 7 and using YouTube in HTML5 (though, I wouldn't mind switching to Flash if necessary for this.)
AI: If you load the YouTube video into an external player instead of using the HTML5 or flash embedded player, you can do so quite easily.
For example, the latest versions of the free, open source, and cross-platform VLC can directly load a YouTube video stream from just the URL to the page: Media | Open Network Stream and then paste in the YouTube URL. You can then use the full gamut of the VLC video player seeking capabilities, including jumping to a specific timestamp, skipping forward frame-by-frame, moving x seconds forward and backward, etc. |
H: Average in Cognito Forms
I have two input fields with type number A and B. I added A calculation field where I want to show the average of these two input fields. So I typed in =(A + B)/2.
I get an error on this formula saying:
Error at character 0. Type must be decimal.
But I cannot choose for decimal field type in the radio list.
Does anyone have a solution for this?
AI: In cases where the input type cannot be clearly defined but the input is to be treated as a number you can actually force the calculation to evaluate the input as a number.
So in your scenario where you have 2 radio list choices and you want to average the numbers.
Instead of this:
=(A + B)/2
Try this instead:
=(int32.Parse(A)+int32.Parse(B))/2
I did a similar test. Here is the form on the form builder screen with calculated field:
Here is the form itself doing the calculation: |
H: Select a sheet to print from, using a dropdown
I have a "workbook" with multiple sheets. Each sheet is a schedule for the week for employees with a bunch of math stuff to help a general manager see their labor.
I'm trying to create a single sheet that would reside in the beginning or end of the workbook which would allow the General Manager to select a week (select a sheet) with the appropriate week and load the data in print friendly format.
So Dropdown is easy, and I can pull info from a single sheet, but how do I make the values change? I would think the formula would be SHEET!C2:C74 which pulls data from that particular sheet and that range, now how can I change it dynamically based on all the sheets in the workbook?
AI: You can use indirect for this. Suppose the dropdown is in cell A1 of the summary sheet, and its possible values are Monday, ..., Friday. You also have sheets named "Monday", ..., "Friday".
Then all you need to do is to put the formula
=indirect(A1&"!A:Z")
somewhere on the summary sheet, e.g., in A2. It will import the columns A-Z of whatever sheet is named in the cell A1. Adjust the range as needed. |
H: DGET is not successfully matching criteria in Time format
I'm trying to use DGET() to match values across several sheets.
If I try and match criteria that are times, it always fails. If I replace the criteria with words, it is successful. Here is an image as an example:
The one that failed was trying to match the time of 7:00 AM and the one that worked is matching the words StuffStuff. If I do an IF statement between the two times, it is TRUE.
How do I get DGET to work with times?
AI: You can use it without "="& like this:
=DGET(F60:M61,"Sat",{"Start Time";F67}) |
H: Query is returning a single concatenated string of values THEN the rows it found
I'm getting some really weird results from my QUERY() Here is an image with an example:
I'm querying for the name where No Show = "No Show". It find the correct name Name 5 but also returns a concatenated list of names separated by a space.
Why is this happening? How do I fix it?
AI: The third, optional, argument of query command is
The number of header rows at the top of data. If omitted or set to -1, the value is guessed based on the content of data.
In your situation, the formatting of column A confused the query, and it interpreted most of that column as header rows. Solution: explicitly indicate the number of header rows, i.e., 1 in your case. |
H: How do I disable the add friend button for mutual friends on Facebook?
I have seen on Facebook that it is explicitly possible for a user who shares mutual friends with another user to somehow disable the ability to become added as a friend. This is regardless of recent blocking or unblockings, or even recent friend requests. and a clearly visible group of mutual friends on their profile. I would like to know how to apply this privacy setting on my Facebook page, so that certain users who I share friends with cannot send me requests.
In Facebook's privacy settings, it seems that I can either set my "Add Friend" possibilities to "Everyone" or "Friends of Friends". How do I make it so some mutual friends cannot add me?
To be clear I do not want to block these people.
AI: You are right, there is only two options "Everyone" or "Friends of Friends". So if you don't want block, you can ignore when they send friend request. They can't add you without your permission. Here ignoring means when someone send you friend request, just delete that request and mark as you don't know that person. In future that person wont be able to sent you friend request from that ID. |
H: Send the argument of a custom function as an email
I am trying to send email via script in Google Spreadsheet. I know that the argument in this case cell B4 will be integer.
In my cell is function =sendEmails(B4) and my script looks like this.
function sendEmails(result) {
var cell = Number(result);
Logger.log(cell);
Logger.log(result);
MailApp.sendEmail("info@domain.com", "Lab", cell);
MailApp.sendEmail("info@domain.com", "Lab", result);
}
But the problem is that in the logs it shows this and the same arrives by email.
[15-09-27 20:13:01:449 CEST] NaN
[15-09-27 20:13:01:449 CEST] undefined
Where is my mistake?
AI: As Rubén pointed out, custom functions cannot be used for this purpose. Sending an email requires authorization, which is not a part of custom function workflow. Quoting from documentation:
custom functions never ask users to authorize access to personal data. Consequently, they can only call services that do not have access to personal data, specifically the following:
[a list that does not include MailApp]
The same page offers a solution:
To use a service other than those listed above, create a custom menu that runs an Apps Script function instead of writing a custom function. A function that is triggered from a menu will ask the user for authorization if necessary and can consequently use all Apps Script services. |
H: Sum based on month and name columns
14.08.2015 John Doe 100
14.08.2015 Bruce Willis 100
09.08.2015 Keanu Reaves 100
15.08.2015 John Doe 250
18.08.2015 John Doe 150
18.08.2015 Keanu Reaves 200
20.08.2015 Keanu Reaves 150
27.08.2015 Bruce Willis 100
06.09.2015 Bruce Willis 100
06.09.2015 Bruce Willis 100
11.09.2015 Keanu Reaves 100
13.09.2015 John Doe 200
14.09.2015 Bruce Willis 100
18.09.2015 John Doe 300
19.09.2015 Keanu Reaves 400
I have a spreadsheet that looks like this (3 columns), and I am trying to create a sum of third column based on the first and second ones. I would like to see the total for user 'John Doe' in 8th month. So far i came up with this:
=sumif(if(month(A:A)=8),"John Doe",C:C)
but it returns 0 (it should actually return 500). Any idea on how should I tweak this?
AI: By using SUMIFS (multiple criteria to define the sum range) instead of SUMIF (one criteria to define the sum range) and adding an extra column B which calculates the month number you can find that sum. The extra column is required because SUMIFS doesn't allow formulas like MONTH() as a criteria.
=SUMIFS(D1:D15,B1:B15,"8",C1:C15,"John Doe") |
H: How to check Twitter followers for a specific point in time (e.g., 2 weeks ago)
I have to find the number of Twitter followers date-wise, e.g., the number of followers I had 2 weeks, 4 weeks, or 6 weeks ago.
I have tried searching on https://dev.twitter.com/rest/tools/console, but it is not accepting any date format while I am querying.
How can I get this info?
AI: You should start a new campaign to attract new followers.
The Campaigns dashboard will show you a variety of metrics related to your followers campaign, such as the number of times users see the ad, the number of times it’s clicked on, your follow rate and your cost-per-follow (CPF).
The Followers dashboard allows you to track your follower growth over time. You can also use it to discover valuable information about your new and existing followers, such as their location, gender and interests.
You can get a comprehensive view of the metrics for all of your Tweets, both paid and unpaid, in the Tweet activity dashboard.
There is no opportunity to add followers from earlier timeline. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.