text
stringlengths
83
79.5k
H: Plus or minus quarters in Google Sheets using formulas I have a date format like this 1Q16 2Q16 3Q16 4Q16 Is there a way to get... input: 1Q16 + 4 output: 1Q17 and... input: 1Q16 - 3 output: 2Q15 ... using formulas only and not code? AI: Using mid() extract the quarter portion of the original date, here after referred to as Q. Similarly extract the year portion, here after referred to as Y. The amount to be added will be referred to as D. To get the new quarter add D to Q and modulo by 4. This will be correct except it will equal 0 when it should be 4. Wrap this whole portion in an if() to handle that case and we are done. Moving on to the new year. Add Y to the trunc() of (Q+D)/4 When Q+D is negative or a positive multiple of 4 we end up 1 to high. Add a check for that at the end. Take these two values and concatenate them with a Q in-between =if(mod(MID(E15,1,1)+F15,4)=0,4,mod(MID(E15,1,1)+F15,4)) &"Q"&mid(E15,3,4)+trunc((MID(E15,1,1)+F15)/4)+ if(or(mod(MID(E15,1,1)+F15,4)=0,MID(E15,1,1)+F15<0),-1,0) Original date is in E15 and the number of quarters to be added to it in F15 This answer is not Y2K compliant, but that's on you and your 2 digit years, if you go to 4 digit you will need to change the mid() for the year to be mid(3,6) MID TRUNC MOD
H: Refresh cell in Google Sheets from a mobile device I'm a teacher creating a "didactic deck" for my students: https://docs.google.com/spreadsheets/d/1j7iJTlRXl24YwUt4zKJdTfNencd_u3RUosRdiWZ8YbE/edit?usp=sharing The first sheet has 5 "cards" randomly taken from the other sheets. Since most of my students will access the deck from mobile devices, the problem is... I couldn't find a way to refresh the sheet from a mobile device. I've added a drop-down data validation on A1 to make the trick, which it does, but it also changes the "cards" for another person who is seeing the page on a web browser, for instance. Then, the question: - How to refresh a sheet (or even a cell) on a mobile device without refreshing it for another viewer on another mobile or web device? AI: If your students are accessing the same Google Sheets spreadsheet while being online all could see the same set of "cards". One way to prevent this is by using Google Classroom, create an assignment and set it to make a copy of the spreadsheet for each student. It's worth to say that nowadays Google Classroom is available to G Suite for Education accounts an for consumer accounts (gmail.com) Another way is to make a copy for each student by other means like: On the spreadsheet URL replace /edit by /copy this will show a "Make a copy" button Set the sharing settings to view only and instruct your students to make a copy by clicking on the menu File > Create a copy Create a script to make the copies for each student and share it with each one. One more way is to tell your students to make the spreadsheet available offline, then turn off all the Internet connections (wi-fi, data service,...) The spreadsheet will be recalculate every time they open the spreadsheet. Once the students have their own copy or have the spreadsheet available for offline access, open it, then if they need to refresh it, close it and open it again, use your the drop-down trick or any other change that affects the a spreadsheet calculation.
H: OneDrive has half loading icon (?) near folder name I uploaded around 3K photos last night (~4GB) and in the morning I saw there was one photo left and it was stuck for a long time. I decided to refresh the page (and cancel the upload by doing that), and uploaded the last file again. Then, I noticed that the new folder has what I think to be a loading icon near it, and also its sub-folders and files has this icon near their name. What does it mean, and what should I do about it? Thanks! AI: Figured it out - it's not loading, it's New. When hovering the little icon it says Recently added, and the html matches.
H: How to turn direction of model in Google Maps? Parted screengrab: Clicking on the line-art map, I see the model turns in complex ways. How can I control the direction? AI: Pegman (that's his name) is indicating the direction of the Street View. Simply drag the Street View image to change your facing.
H: I changed my username but my YouTube channel title shows my old name I changed my YouTube name using the "Edit on Google" link in the "Overview" section in YouTube. This worked fine and I see the new name but when I got to my channel page it still shows the old name for the channel title. Is there a separate setting to update my channel title? It also shows my old name in a few other sections like "Analytics" in "Creator Studio". Here is a screenshot to show you the problem. My new name appears correctly in the account popup view but on my channel page it still shows the old name in the title. AI: It can take a while until the name change is displayed everywhere. Clearing your cache and cookies may speed it up for you, but if you just wait, it should change itself eventually. Note that your old name will persist longest in search results, sometimes for weeks.
H: Google Sheets - Selective Totals I have a sheet where two columns are limited to 30 possible values, and within those two columns, each row will contain two different values. Those 30 values come from two categories of 15, which are further subdivided into three categories of 5 values each. I've figured out how to total the number of times each individual value appears, but I also need to total the number of times values from each category & subcategory appear in a row. The part I'm having trouble with is when two values from the same category are in the same row. I need the total to still only increase by 1 instead of 2 in this case, but I'm stumped on how to accomplish that. I've been trying with SUMIFS, but either I'm not getting the formula right, or that isn't the right function. Any help would be greatly appreciated! EDIT: Adding a screenshot and some more details from the comments. Should have done that from the start. AI: Try L3: =SUMPRODUCT((IFERROR(MATCH(B:B,K4:K8,0))+IFERROR(MATCH(C:C,K4:K8,0))>0)*IF(D:D="Complete Game",1,0.5)) MATCH to find matched cells SUMPRODUCT to add the matched cells
H: What are the different parameters used in Google search? For example: If I search for hello in Google, URL looks somethings like this: https://www.google.ca/search?q=hello&rlz=1CAHPZT_enCA791CA791&oq=hello&aqs=chrome..69i57.3586j0j9&sourceid=chrome&ie=UTF-8 I am interested in knowing more about these parameters. AI: When a user "Googles" something, there are multiple parameters being passed on to the Google search service. Since the example you put in the description is the most basic one, the URL looks short. Your query utilizes the following parameters: q: the query string Google is passing on to the search service. oq: the query string you typed on Google. aqs: stands for assisted query stats and is found when searching Google through Chrome omnibox. Mainly used for logging purposes, the parameter contains impressions of all auto complete matches shown at the query submission time. sourceId: type of the source. ie: type of encoding, UTF-8 is mostly used. If you search for images, maps, videos, etc., the parameter list would be much longer.
H: Conditional Formatting in Google Sheets based on multiple comparisons I am trying to change the color of a cell using conditional formatting in Google Sheets using the following formula: =IF(B4<=B1, (IF(C4<=C1, (IF(D4<=D1, (IF(E4<=E1, ))) )))) Pseudo code would be long the lines of: IF B4 is less than or equal to B1, AND C4 is less than or equal to C1, AND D4 is less than or equal to D1, AND E4 is less than or equal to E1, THEN change the color of the cell However, this does not seem to be working. Any pointers? AI: Conditional formatting formulas should return TRUE or FALSE. NOTE: 0 is coerced as FALSE while other number values as TRUE For the rule that is expressed in the question you could use AND =AND(B4<=B1,C4<=C1,D4<=D1,E4<=E1)
H: Copying file with cell data only I have been trying to copy file with cell data only but unsuccessfully. I have a Google sheet documnet with importxm function of about 2000 rows. When the function runs it populates the cells but sometimes the connection gets reset and I loose the data. The second function copyValuesOnly works fine for the same sheet. I am passing the range directly but it reuses the sheet every time. So if I automate it it will be writing the current data in the same sheet and it will overwrite it. I also have a function that I made to save file but I get the exact copy of the file (formulas not data only). Therefore, I am trying to combine both functions but it doesn't really work. How could I save the sheet values in new file instead of in another sheet. This the post I got one of the functions from: https://webapps.stackexchange.com/questions/49952/how-to-paste-a-cell-range-automatically-values-only/116120#116120 This is what I am trying to copy the file: function SaveFileData() { //file has to be at least readable by the person running the script var currentdate = new Date(); var datetime = "HW: " + currentdate.getDate() + "/" + (currentdate.getMonth()+1) + "/" + currentdate.getFullYear() + " @ " + currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); var fileId = 'fileID'; var destFolder = DriveApp.getFolderById('folderID'); var file = DriveApp.getFileById('fileId'); copyValuesOnly(file); file.makeCopy(datetime, destFolder); } function copyValuesOnly(file) { var source = file.getRange('Sheet2!D1:K2000'); source.copyTo(file.getRange('Sheet1!A1:K2000'), {contentsOnly: true}); } TypeError: Cannot call method "getRange" of undefined. (line 26, file "Logger") AI: Since file.getRange throws that error, that means file is undefined. Look at why that happens. Possibly fileId is wrong. In any case, getRange is a method of Spreadsheet, not of File. You need SpreadsheetApp.openById to get a Spreadsheet object instead of DriveApp.getFileById which returns a File object.
H: Google username aliases not editable? I have a friend, let's call her Sue. She has a generic email, let's say it's SuesEmail@gmail.com In my Gmail account, whenever I email her, Gmail autocompletes her email address, and gives it a human readable name as follows, To: Sue Jones <SuesEmail@gmail.com> Sue is now married, uses same email, and changed her last name to Smith. In my contacts, I've changed her name to Sue Smith. But Gmail continues to always autocomplete her name as: To: Sue Jones <SuesEmail@gmail.com> And every time I initiate an email to her, I have to edit the "TO" line, to read To: Sue Smith <SuesEmail@gmail.com> Is there a way to get Gmail to autocomplete using the correct name? Several observations: It's not the browser, as I see this in Firefox, internet explorer, clean installs of Chrome, and in the gmail android application. Sue's Google+ profile has Sue Smith. All emails from Sue, when examining the raw ASCII text format, have Sue Smith. AI: If you already updated her info on your Gmail contacts and there is no duplicate entry, It sounds like this issue might be caused by Sue herself. Has Sue updated her last name within Gmail? It might be the result of Google looking for the contact SuesEmail@gmail.com and pulling her info from her profile or settings which still reads Sue Jones. I suggest you ask her if she has updated her info on the Gmail settings page.
H: This setting is managed by your domain administrator I'm following Let less secure apps access your account - Google Account Help, specifically "Option 2", however when I click on Less secure apps, I get following message: This setting is managed by your domain administrator. I am the domain administrator, where is this setting exactly? I can't find it( Please advise. AI: From the G Suite Administrator Help: Sign in to your Google Admin console. Sign in using an administrator account. From the Admin console dashboard, go to Security and then Basic settings. To see Security on the dashboard, you might have to click More controls at the bottom. Under Less secure apps, select Go to settings for less secure apps. In the subwindow, select the Enable access to less secure apps for all users radio button.
H: Sharing Google Drive file using groups I am using G Suite and I had a plan to organize all my employees into groups. Rather than sharing files individually with everyone, I want to share it with a group, so that all the employees present in the group can have similar access. My question is what if I add a new member to the group, would he have access to all the files that was shared prior to him joining the group? AI: Yes, if you add a new member to a group used to share files in Google Drive, the new member will be able to access the files shared with the group previously. From Use groups to share content If you later add new members to the group, they'll be able to access the document only via the document's URL. To make the document appear in the Shared with Me view of a new member's Google Drive, you must reshare the document with the group or share the document with the new member individually.
H: How can I know in which US region a snapshot ID is located? I have a public snapshot ID, e.g. snap-d203feb5. How can I know in which US region(s) it is located? I know that I can go on https://us-east-2.console.aws.amazon.com/ec2/v2/home?region=us-east-2#Snapshots:visibility=public;search=snap-d203feb5;sort=snapshotId and try all US regions: but it is inconvenient. AI: There isn't a way to search multiple regions for an EBS snapshot. Snapshots are literally, actually located (stored) in a specific geographic region, and interactions involving that snapshot are always sent to the infrastructure in that region. (Copying a snapshot to another region creates a literal copy in the new region, with a new snapshot identifier.) Even though the snapshot IDs are designed to be globally unique -- hence the expansion from 8 hex digits to 17 for the identifiers of new snapshots that happened in 2016 -- there doesn't appear to be a global directory. This apparent lack of functionality seems to be explained by the fact that console interactions with AWS services are done via the documented APIs, and the console -- with very few exceptions -- is actually a front-end to the same APIs used by the SDKs and aws-cli, as opposed to being a separate, independent interface to the services. This is why the console will typically let you attempt to do something you aren't authorized to do, only to return an error, rather than gray-out or not offer those operations -- the console doesn't actually know your AWS service permissions. It sends API requests as you, the underlying service allows or denies your request, and if denied, the console returns the error. The various services in AWS follow one of three basic architectural philosophies, which I discussed in more detail at SO, and the console reflects this in the region selection drop-down at the top right. The most common architecture is for the service in each of the geographic regions to be administratively and operationally independent. While the regional deployments do have some cross-region communications capabilities, such as the ability to copy an EBS snapshot from one region to another, the regions only communicate with each other in a few limited circumstances. EC2, of which EBS is a part, falls into this category. Most operations are fully independent from all other regions, because more dependencies would reduce reliability and availability. If a search for a snapshot were to fan-out to each independent region, then all searches would necessarily need to fail if any one region were experiencing an operational fault and couldn't respond, otherwise search results would be inconsistent, returning an erroneous "not found" response in the event of a failure to secure a response from all regions. The second type of service is global service, which the console will report "does not require region selection." These services, like IAM, CloudFront, and Route 53, still have operational segregation across regions, they operate from a global database that is not subject to regional modification, and all API requests are actually sent to an endpoint on one region, which happens to be the original AWS region, us-east-1, a fact that the console hides from the user because it isn't relevant. Administratively, these services are dependent on us-east-1. Operationally, they are not. A catastrophic event in us-east-1 would not prevent these services from continuing to function elsewhere, but there's a potential that no provisioning changes would be possible until such an issue was resolved. The third architecture is a hybrid, Amazon S3. Each region is independent, yet the console "doesn't require region selection" here, either. This is because S3 is indeed a hybrid, allowing all of its regional endpoints to have access to the global database of buckets, while restricting each regional endpoint to being able to access only the contents of buckets that you declared to be created within that region (except in the case of copying objects between buckets, which S3 can do internally, even across regional boundaries, avoiding the need to download+upload). You can send an API request to any S3 regional endpoint and ask it to create a bucket in any other region, and any region can give you a list of all your buckets across all regions (but, again, not a listing of objects within the foreign buckets). So the console asks S3 where each bucket is, in the background, and routes its generated API requests to the appropriate endpoint for each action. This is a lot of background detail, arguably helpful, offered for your consideration as a plausible explanation of why a global search for a specific EBS snapshot is not supported -- it seems to be a side effect of the design of the underlying service architecture, for reasons of reliability and scale.
H: License for public Google Docs? If I make a Google Drive document publicly accessible, can others use that information as they wish or is there a license that applies? For example, if I record experimental data in a spreadsheet and generate a public sharing link, is this data now in the public domain available for any commercial and non-commercial use cases? I chatted with the Google Suite support team about this but they did not know the answer... AI: From Google terms of service: You may not use content from our Services unless you obtain permission from its owner or are otherwise permitted by law. So the answer is no: other people cannot use your work as they wish just because you shared a Google Doc. (The "otherwise permitted by law" includes things like Fair Use concept of U.S. copyright law.) The absence of a license does not mean "can use that information as they wish"; it's exactly the opposite. License is a permission to do certain things; if there isn't one, then no permissions are granted. (Compare to Stack Exchange, where the user-contributed content is published under a certain license. That license gives others permission to, for example, redistribute or remix the content. There is no such thing with Google Docs.)
H: Boomerang: "Your Send Later message must be scheduled earlier than your Boomerang reminder" I composed an email that I would like to send tomorrow morning using Boomerang. When I click "Send Later", I receive the following dialog box: and may not proceed to scheduling the email for sending. I have scoured the internet for a resolution to this problem but unfortunately am only directed to instructions for scheduling emails where this error does not occur. AI: Quick Fix Uncheck the box next to the "Send Later" button. Explanation Boomerang gives the ability to specify two points in time at the bottom of the email composition page: Boomerang Reminder date/time Send Later date/time The Boomerang Reminder date is the one that is located to the right of the red "Send Later" button and will select a time to send you a reminder email. This is enabled by the check-box to the right of the "Send Later" button, so if you want to disable it, just un-check this box: The Send Later date and time and specified in the pop-up dialog that appears when you click the red "Send Later" button. As mentioned before, this time is a completely different thing than the reminder date. This error occurs when the email's reminder time is set-up to be before the send-time. It makes no sense to set up a reminder on an email that has not yet been sent, which is why you get the error. You could also resolve this by setting the reminder time to be at some point after the time specified in the send-later time, in the case that you want both.
H: Google Sheets – copy and paste a cell's value while preserving a hyperlink I'm working with exported data that I've pulled into Google Sheets. I have a column with URLs and a corresponding column with text labels. I can combine the two into a hyperlinked cell using a forumla: =HYPERLINK(A1, B1) where A1 and B1 are cells containing the URL and text label respectively. Now, I want to copy over the hyperlinked cell into another spreadsheet. Is there a way to do this that preserves the hyperlink but doesn't reference the original cells? Example: Let's say A1 = "https://google.com" and B1 = "Google" I set up a formula: =HYPERLINK(A1,B1) which produces a hyperlinked cell showing "Google" I copy this cell and paste it in a different spreadsheet Desired Outcome: the destination cell should be =HYPERLINK("https://google.com", "Google") which produces a hyperlinked cell showing "Google" Here's what I've tried so far: Simply copying & pasting the cell updates the cell references based on my destination cell Pasting value only just retains the text label but loses the hyperlink The various other "Paste Special" options don't seem to apply (but I tried them out anyway for good measure) Updating the original formula to use $ references (e.g. =HYPERLINK($A$1, $B$1)) allows me to copy and paste the cell correctly within the same sheet. But this fails if I try to copy and paste the cell to a different spreadsheet. For reference, here's a test spreadsheet where I set up this problem. AI: I do not see an easy way to resolve this. there is a messy way: You could make an additional cell with the formula ="HYPERLINK("""& A1 & ""","""&B1&""")" paste it in "as value" to the new sheet and then edit it to add the '=' at the front to make it a formula. including the = in the original construction of the formula results in unintuitive behavior when pasting as value.
H: Automatic Cell Update on Certain Date I am quite new to Google Sheets and I am wondering if someone can help me as I am looking to update a cell by +1 each time a certain date comes about. I currently have; =today cell Counter cell (This will be the one rising by +1 each time the =today hits a certain day of the month) A monthly cost cell which I will subtract from a total cell A total cell which should decrease by the monthly cost each time the counter rises. I already have a setup where If I manually add 1 to the counter cell then the total cell decreases as I want it but is there an automatic way by using the date? Say if the =today turns the 25th and a cell is assigned to the 25th then the counter goes up automatically. AI: https://support.google.com/docs/answer/6055612 =datedif(G27,today(),"M") where G27 is your reference date, could also be a quoted string for the first date "04/16/2018" that will provide you the number of months since the reference month, your "counter cell". Datedif for months only increments the month based on the numbered day of the month (ie the above will not say 1 until 05/16/2018. See "Notes" in the above link) which matches what you described.
H: How do I delete very old photos from the "Insert Photo" dialog in Gmail? There was a time when it wasn't obvious to anyone that Google Hangouts was archiving all photos sent to and fro, into albums (much like Whatsapp). The Internet generally believed that Google wouldn't be so careless as to make private messages and pictures appear just anywhere unexpectedly. Well, we weren't exactly wrong, but when you try to insert a photo in Gmail with this here... ...a dialog appears with photos from every Google-related source: Google Photos, Google+, Hangouts, etc. I attempted to delete all traces of these photos by going through menus in Google Hangouts, Google+, Google Photos, and Google Drive, and I still can't seem to find where the older photos are stored. How can I delete older photos that appear in the Insert Photo dialog of Gmail? AI: Log into http://picasaweb.google.com and you should be able to find older photos that you don't find in Google Photos. Delete the pictures from there. Source (someone else with the same problem): https://productforums.google.com/forum/#!topic/gmail/Obo3xrS-Okk I'm self-posting this question and answer despite the following thread... Delete a profile photo from Google+ When Google+ Photos shows no record of the photo ...because there the question is about profile photos, which people may overlook if they're not concerned with profile photos. Also, that thread didn't appear in my Google search, so hopefully this reformulation does better with SEO.
H: How to get a link to add a Google Calendar? I'm aware of the following methods of adding a Google Calendar: Show embedded calendar, hit the +Google Calendar button: Go to Calendar Settings. Copy the "Public URL to this calendar" such as https://calendar.google.com/calendar/embed?src=foo%40example.com. When the user taps the link, they will see an embedded version of the calendar. They would then tap the bottom right +Google Calendar button and it'll be added to their calendar. Give the user the "Calendar ID" email address: Go to Calendar Settings. Under "Integrate calendar," copy the "Calendar ID" such as en.christian.holiday@group.v.calendar.google.com The user would then open their Google Calendar, and under "Add a friend's calendar," they would enter that long email address. Add a shared resource: Hit the plus button near "Add a coworker's calendar" Hit "Browse resources" Add a calendar from the list However, all of these methods are multi-step and less than ideal. I just noticed that there is a 3rd, more optimal way. There's an ability to create a link of the form https://calendar.google.com/calendar?cid=ZW4udXNhI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t. Upon tapping on a link like that, it displays the calendar in the user's google calendar (or prompts them to add the calendar). I tried substituting my "Calendar ID" in place of the "cid," e.g. https://calendar.google.com/calendar?cid=en.christian.holiday@group.v.calendar.google.com but this produces an invalid link with the following error message: Sorry This email address isn't associated with an active Google Calendar account: en.christian.holiday@group.v.calendar.google.com. Please check the email address and try again. Even if I try escaping the @ sign with %40 (https://calendar.google.com/calendar?cid=en.christian.holiday%40group.v.calendar.google.com), I get the same error message. How do I get my calendar's cid so that others can add it with a single click on a link? AI: Update: Normally you can just append your calendar id to the url: https://calendar.google.com/calendar?cid=ht3jlfaac5lfd6263ulfh4tql8@group.calendar.google.com However, there are times when this doesn't work and you're required to use base64 encoding: https://calendar.google.com/calendar?cid=ZW4udXNhI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t The exact rules for when one will work and the other won't seem fuzzy to me. This is a few things I found: If the id contains a #, unencoded id won't work, base64 will. If the id is a resource (e.g. @resource.calendar.google.com), unencoded id works, base64 doesn't work. If the id is a standard group (e.g. @group.calendar.google.com), both unencoded and base64 work. If the id is a user's email address (e.g. @example.com), both unencoded and base64 work. If the id is a group.v (e.g. @group.v.calendar.google.com), not sure which one will work as I've only seen these with the # symbol which forces you to use base64. To create a single-click add to calendar link (if you are the calendar owner): Go to Calendar Settings. Under "Access permissions," click the "Get Shareable Link" button. It will be of the form https://calendar.google.com/calendar?cid=bWFya2V0aW5nQHbWFya2V0aW5nQH. Tapping on this link will prompt the user to add it to their Google Calendar. To create a single-click add to calendar link (if you are not the calendar owner): Get the "Calendar ID." Encode it as base64 (e.g. by using a website such as base64encode.org). You now have the cid in a format that is expected by Google Calendar. Prepend https://calendar.google.com/calendar?cid= to the cid, and voila, you have a single-click add to calendar link. (Interestingly enough, the cid url will only work for a base64 encoded parameter even though the UI will show the unencoded email address in the error message.) To verify that the link works, assuming you don't want to remove the calendar: Hide the calendar in Google Calendar by unchecking it on the left sidebar. Navigate to the link you just created. It should now be checked on the left sidebar. Note: an alternative to figuring out the encoded cid, is to figure out where the +Google Calendar button (as part of option 1 in the question) takes you (e.g., via monitoring the network, or turning off your network and clicking the link).
H: Google spreadsheet equivalent of Excel's Ctrl+Semicolon on international keyboards In Excel, I often use CTRL + ; to enter the current date. Is there an equivalent shortcut in Google Spreadsheets that works for international keyboards like Belgium-Dutch (nl-BE)? AI: This must be a bug in Google. I have to use CTRL + $ for some reason (the language of my keyboard is not en-US?). Google itself doesn't mention this anywhere. Solution was found here in the last comment.
H: Find & Replace part of the text I would like to ask if it's possible to find & replace part of text in specified range and still preserve rest of the text as if you do it with Ctrl+H. I am using this script function replace(){ var sss=SpreadsheetApp.getActiveSpreadsheet(); var ss=sss.getActiveSheet(); var s=ss.getRange("B:B"); var vlst=s.getValues(); var i,j,a,find,repl; find="*Sample*"; repl="*Result*"; for (i in vlst) { for (j in vlst[i]) { a=vlst[i][j]; if (a>=find) vlst[i][j]=repl; } } s.setValues(vlst); } but sadly it replaces all the text, i would need something like this : sample(Hello world) ----> apple(Hello world) but instead i just get "apple" How can I get it to only replace part of the text? Any help would be apreciated. AI: Changing if (a>=find) vlst[i][j]=repl; to vlst[i][j] = a.replace(find, repl); replaces the first occurance of find in each cell. The linked documentation discusses more advanced ways to use String.replace() such as ignoring case. https://www.w3schools.com/jsref/jsref_replace.asp
H: Do YouTube uploads include metadata? When uploading videos to YouTube do the video files include metadata that a viewer might be able to see like location and other personal details? Like the EXIF info from a photo. AI: You can manually add a video location and recording date in the advanced settings: YouTube also takes Spatial Media Metadata that tell YouTube whether your video is 3D, spherical video, VR180, and so on. Other than those, no metadata seem to get preserved when uploading.
H: Is it possible to get an OTRS ticket in bulk for multiple works by the same author? I have a lot of images I want to upload to Wikimedia Commons, however I do not own them. Is it possible to get an OTRS ticket to validate all of them or should I request a OTRS ticket for each work individually? AI: According to the OTRS help page: Please send us a clear statement that your Commons account (or some other Commons account) is authorized to license your works, either any work or some set of works, e.g. "My images from event X, 2013-10-15". We will make a note of this for your future uploads.
H: How to verify a Facebook page? A famous actor in my country asked me to help him verify his Facebook page, how to do that? AI: Requesting a blue verification badge Verify you have all that in the list, and submit a request with an official government issued photo identification. It's encouraged to include additional information to help review your request. Note: It seems that the option for requesting verification isn't available in every country. How do I request a blue verification badge? ... To request a blue verification badge, your Page or profile must comply with Facebook's terms of service and have the following: A cover photo A profile photo A name that follows Facebook's guidelines Content posted to the account “Follow” enabled (profiles only) You can submit a request by filling out this form. We require a copy of your official government-issued photo identification (example: passport, driver's license, national identification card) to validate your request. We encourage you to include additional information to help us better review your request. Please include a few sentences explaining why the account should receive the blue verification badge and relevant URLs that help illustrate public interest for the account.
H: How to use Google Sheets checkboxes with logic? As of April 2018, checkboxes have been added to Google Sheets. They are utilized by going to Insert->Checkbox, which converts the cell(s) to checkbox form. When unchecked, by default the value becomes FALSE and when checked, TRUE. The criteria for checked/unchecked can be changed via Data Validation. As far as I can tell, the only way to retain the checkbox form is by manually entering the data precisely or checking/unchecking it. If the data isn't exactly TRUE or FALSE, then the checkbox goes away and instead the values are shown. There is no information found in Google's Documentation, that I can tell. As an example of the problem, the data validation rules and checkbox formatting go away if you use "=TRUE" in the formula bar instead of just "TRUE". How can I set the cell's contents using a formula while still being able to use the new checkbox feature? AI: Short answer Instead of using the Insert > Checkbox use the Unicode characters ballot box / checked ballot box: ☐ ☑ or another similar character / emoji Example =IF(ISTEXT(A1),"☑","☐") Explanation At this time there isn't an operand, function or format for an Insert > Checkbox the same as there isn't any of this for an Insert > Chart, Insert > Image, Insert > Note, Insert > Comment NOTES: SPARKLINE function works completely different than an Insert > Chart IMAGE function works completely different than an Insert > Image The exception could be: HYPERLINK function similar to an Insert > Link
H: How to verify a Twitter account? Someone asked me to help him verify his Twitter account, how to do that? So that there's a blue tick next to his name. AI: Currently suspended due to work on a new authentication verification program. Follow @verified for updates. We've paused public submissions for verification. (posted on 11:55 PM - 26 Feb 2018) We're working on a new authentication and verification program. In the meantime, we are not accepting any public submissions for verification and have introduced new guidelines for the program. Verified account FAQs In general: What types of accounts get verified? An account may be verified if it is determined to be an account of public interest. Typically this includes accounts maintained by users in music, acting, fashion, government, politics, religion, journalism, media, sports, business, and other key interest areas. In addition, this is a wikihow guideline on getting a verified account on twitter, which I believe will still be relevant - it gives guidelines on how to improve your profile (quality, activity, publicity etc.)
H: Query multiple data input ranges into 1 column output Not 100% sure how to explain this, feel free to edit this with more intelligent language. I need to pull data from 2 tables in 1 sheet. Meaning, I need multiple query functions. Those query functions need to output vertically. Both of my query functions work independently, but trying to combine them, only the first query function outputs. Using this post as a guideline: Query Multiple Ranges with Results in Row I wrote this function ={QUERY(A3:B,"select A where B is null");QUERY(D3:F,"select D where(E='Yes' AND F is null)")} My understanding is ={...} Creates an array that was explained as The curly brackets {} are used when you want to access more than one thing, like you want to pull data from more than one tab sheet... Source: https://productforums.google.com/forum/#!msg/docs/WOWhf-lGxmo/xsHQt4C2AQAJ ; should output vertically instead of horizontally. My example sheet https://docs.google.com/spreadsheets/d/1lZeBDsrfPrfFU_Aj6Em-3dvtav3K8k869cYx7vAazpo/edit?usp=sharing (Images in case you don't want to click the link) The output that I get is just hello from Table 1 and nothing from Table 2, which should output with Foo appended after hello How can I get the output from the 2nd query to show up? AI: The "problem" is that the formula is using open references so there are a lot of blank cells from Table 1 above the Foo value. One way to avoid having a lot of blank cells is to filter them out: ={QUERY(A3:B,"select A where A is not null AND B is null");QUERY(D3:F,"select D where(E='Yes' AND F is null)")}
H: Is it possible to trigger a google script externally? Backstory: We use Google Sheets via Gsuite and have several users. I'm using the admin account and creating some parsing scripts that load a CSV, extract processed data and place them into the google sheet that hosts the script. Once a month, a different user will upload the csv using a naming convention and I will open the sheet (the script is triggered via an onOpen trigger) to make the script run and everything works fine, so this part is done and working well. The Goal: What I'd like to do is allow the user uploading the CSV (our office manager) to somehow trigger this script without being logged in as me. We have zapier at our disposal if that helps, but I'd rather avoid a significant change to the script to get this rolling for such a small, but nice-to-have payoff. The Question: Is there a path of least resistance to trigger this script via some other user with access to the sheet that doesn't involve a lot of additional steps from them, such as an api call from somewhere, google form or anything that could essentially be connected to a button press by the other user. AI: The "path of least resistance" is very likely to publish a Google Apps Script web app set it up to be ran as you that call "the script". For details see the guide on the official Google Apps Script site. .
H: Meaning of speech bubble in desktop Twitter? In the Twitter desktop version, what does a speech bubble mean under your tweet? I thought it might mean "there are replies to your tweet". But when I click on the tweet, nothing shows up. AI: It is a reply, but apparently the reply didn't show up immediately: The speech bubble is also a button, allowing you to send a reply tweet.
H: When I comment on a post it does not display on my timeline or newsfeed I have privacy settings set to Only Me (until I figure this out) for 'Who can see my future posts' and 'Who can see posts I'm tagged in', and when I post on an article it does not appear anywhere on my pages; timeline, newsfeed, history, etc. (not sure where it should appear anymore tbh). Before I share with more than me, I want to make sure it is configured right. Regardless of this, I thought all posts to public pages would show up on one of my pages. AI: When I comment on a post it does not display on my timeline or News Feed Regardless of this, I thought all posts to public pages would show up on one of my pages. There are two aspects here: posts and comments. Posts to public pages, for example, if you post on the public page of your local cinema, will be publicly viewable by anyone with access to that page (which is everyone) regardless of your privacy settings. Posts you're tagged in and things that you post on your timeline are currently only visible to you, but otherwise would be shown to all of your friends in their News Feeds and on your own timeline. Think of it this way: when you post on your own timeline (which can be done by visiting your profile page, or through your News Feed) it is like writing in your diary. Your privacy settings decide who can read your diary, so that might be just you, or all of your friends, or all of the public. You can control the privacy settings of your own diary. If you post on your friend's timeline, you are writing in their diary. Everyone who they have allowed access to their diary can see what you posted. If you post on a public page, it is like writing on their billboard. The public can all see it. Moving on to comments: If you comment on a friend's page or a public page's post, that comment is visible to anyone who could view the original post, but it won't show up on your timeline, because the original post wasn't written in your 'diary'. If you want to see the history of all your actions, you can visit your activity log via your profile page, it should be at the bottom right of your cover photo.
H: Does WhatsApp backup is taking space in Google Drive? Does WhatsApp backups count against my quota of my Google Drive? AI: Starting from November 12, 2018, the answer will be NO. Important: Starting November 12, 2018, WhatsApp backups will no longer count towards the Google Drive storage quota. Furthermore, WhatsApp backups that haven't been updated in more than one year will be automatically removed from Google Drive storage. To avoid the loss of any backups, we recommend you manually back up your WhatsApp data before November 12, 2018. Old answer: Yes. Sources: From Google Drive APIs: Storing Application Data The 'Application Data folder' is a special folder that is only accessible by your application. Its content is hidden from the user, and from other apps. Despite being hidden from the user, the Application Data folder is stored on the user's Drive and therefore uses the user's Drive storage quota. And from this question on Quora: answered by Danish Shams, Consultant (Google Cloud & Microsoft Office 365) Your backups will use your Google Drive quota.
H: Transfer Google Accounts I'm part of a nonprofit that runs workshops for schoolchildren. In these workshops they must edit Google Drive documents. Up to 90 children attend these workshops at a time and they all need a suitable account to access the documents. We don't want them to use their own google accounts because of the privacy implications so we want some workshop-only accounts. But registering 90 accounts is extremely time consuming (plus, it appears that you can only register four or so to the same phone number). Is there a system by which we can have a 'group' of Google Accounts created in bulk and administered by some trusteed user? We've got a budget, but my googling is coming up with nothing (extremely ironically) AI: Checkout if your non-profit is eligible for G Suite for non-profits on https://www.google.com/nonprofits/eligibility/ if so, you could ask Google to give you enough accounts to run your workshop for free. With G Suite you could assign someone as the organization administrator who will be able to do bulk account creation / password reset and more.
H: Google App Script TypeError Cannot Call Method getSheets of null Wondering if anyone can assist in debugging this Google app script. The script works as needed to create CSV files of each Sheet in my workbook, but it throws an error every time: "TypeError: Cannot call method "getSheets" of null. (line 10, file "Code")" I run this on a timer trigger every 15 minutes, so I'm starting to get a lot of error messages piling up, even though the output is correct each time. //DOWNLOAD CSVs function onOpen() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}]; ss.addMenu("csv", csvMenuEntries); }; function saveAsCSV() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheets = ss.getSheets(); // DriveApp. // create a folder from the name of the spreadsheet //var folder = DriveApp.getFoldersByName("BrandonTestFolder"); for (var i = 0 ; i < sheets.length ; i++) { var sheet = sheets[i]; // append ".csv" extension to the sheet name fileName = sheet.getName() + ".csv"; // convert all available sheet data to csv format var csvFile = convertRangeToCsvFile_(fileName, sheet); // create a file in the Docs List with the given name and the csv data var files = DriveApp.getFilesByName(fileName); while(files.hasNext()) { var file = files.next(); file.setContent(csvFile) } //DriveApp.createFile(fileName, csvFile) } // Browser.msgBox('Files are waiting in a folder named ' + DriveApp.getRootFolder().getName()); } function convertRangeToCsvFile_(csvFileName, sheet) { // get available data range in the spreadsheet var activeRange = sheet.getDataRange(); try { var data = activeRange.getDisplayValues(); var csvFile = undefined; // loop through the data in the range and build a string with the csv data if (data.length > 1) { var csv = ""; for (var row = 0; row < data.length; row++) { for (var col = 0; col < data[row].length; col++) { if (data[row][col].toString().indexOf(",") != -1) { data[row][col] = "\"" + data[row][col] + "\""; } } // join each row's columns // add a carriage return to end of each row, except for the last one if (row < data.length-1) { csv += data[row].join(",") + "\r\n"; } else { csv += data[row]; } } csvFile = csv; } return csvFile; } catch(err) { Logger.log(err); Browser.msgBox(err); } } AI: The "active" methods, like getActiveSpreadsheet(), return null when the script is triggered by a time-driven trigger. You should replace this by openById('yourSpreadsheetId')/openByUrl('yourSpreadsheetUrl') methods.
H: How do I see previously sent friend requests on Facebook? I know how to see requests sent to me. But is there a way to see all the friend requests I've sent yet not approved? AI: You can see it here: Friend Requests Sent. (source)
H: Privacy of Google Drive links Sometimes posts on SE contain links to Google Drive documents, which is fine I guess. If I click on the link can they see who opened the link? Or, more specifically, if I open a public Google Drive link does that revel my Google identity to the owner of the drive? AI: Your details are not revealed. While you are actively viewing the document, other people viewing the document (including the owner) will see an icon representing you, but the name on the icon is random as shown in the screenshot below.
H: PDFview in Google Docs I want to preview PDF in google docs. I use 'http://docs.google.com/gview?url=mypdfurl'.I try to access pdf using localhost http connection. Sometime it is working fine and after some time It gives error "Whoops There was a problem to preview this document". I try many things like clear cache and cookie and also try other browser and incognito. I don't want to show this messages to my clients. So any hint or idea about it. AI: According to Jake - Community Specialist on the Official Google Docs Forum https://docs.google.com/gview?url= is deprecated
H: Which Employee ( avoid if conditional to change ) This file is like a transaction orders page , i want my employee to select his name ( ex. employee A ) , then for any one who write the order ( ex. ADB ) the sheet fill which employee do that depend on the checkbox ( Tick box ). i used this : =if(E2<>"", if($A$2=True,"A",if($B$2=True,"B",if($C$2=True,"C","Some Thing Wrong"))),"") The problem is : if employee B change the check box to his check box all ( who ) column change to B and either employee A who do it before so on. Can i force the if condition to keep the first selection and dont change later ?! This what i need But this what happened Ex. https://docs.google.com/spreadsheets/d/1nJ_-hfsfDTZYD-weULdB4Swg97Bd6v4iiXjXANtve7Q/edit?usp=sharing AI: Can i force the if condition to keep the first selection and dont change later ? You have to replace the formula by it's value. To do this automatically you will have to use a script. To learn about how to do this, read Extending Google Sheets. Considering that you will use a script, perhaps it will be better to make the whole thing with the script, in other words, put the conditional on the script rather than using a formula.
H: What is the file converted format that YouTube plays to be so fast? first i thought to be flash, but seems that flash is a old tec now a days. or they keep the uploader video file format? as nobody can see the format on their page. AI: Actually you can see the format (at least codecs) on their page. Right click on video player and select Stats for nerds. As you can see the Codecs are vp9 and opus. If you want to know the actual format (container), please refer to the list below. In this example its a .webm file. YouTube uses multiple formats for playback in various types of devices. Here they are based on priority. WEBM Google loves their VP9 codec. So, If it's a modern browser and supports WEBM playback and has the CPU resorces to decode VP9 it will use WEBM format. Video codec: VP9 or sometimes VP8 Audio codec: Opus MP4 It's for the all other modern browsers that supports HTML5 video. The MP4 container have: Video codec: MPEG-4 Part 10 aka h.264 Audio codec: AAC FLV Although it has announces the end of flash it still .flv files for older browsers and devices and will discontinue soon. The flv files are below 720p. 3GP This format are for older mobile devices and only available in 240p and 144p. This container have: Video codec: MPEG-4 Part 2 Audio codec: AAC
H: Automatic insertion of current date when rows are entered via Zapier Unfortunately, as a new user I am not allowed to comment. This is why I need to do a new post regarding to this topic: Insert current date to cell based on content in other cell This is my code in Google Sheets Script: function onEdit(e) { if (e.range.getSheet().getSheetName() == 'Tabellenblatt1' && e.range.getColumn() == 1) { e.range.offset(0,1).setValue(new Date()); } } It works perfectly when I enter data in cell 1 manually, but when data is added via API (in this case when data is added via Zapier) it does not work. Anybody can give me a hint why? AI: The edit triggers, simple and installable, are triggered by changes directly done by the user while having the spreadsheet open in a web browser. Similar Q&A Trigger function when IMPORTRANGE() is updated Reference Simple triggers
H: Following someone on Facebook - will they get notified? Following on Facebook: If I start following someone (like a public figure) - they get notified about new followers? If I un-follow a friend and then re-follow him - will they get notified on any of them? Sources would be useful. AI: If I start following someone (like a public figure) - they get notified about new followers? Yes, they will get notified. Some individual may turn off notification for a new follower. In that case, no. Now if you're wondering, Will they get a notification like, "arieljannai is following you."? That depends on how many followers they got in the last certain amount of time. It can be from a few hours to a couple of days. If they get a follower every once in a while they will get the notification: "arieljannai is following you." But if it's a popular public figure, they may get a notification: "John, Jenny and 30 other people started following you" Where your name may not even be shown. But they can click on the notification or check their follower list later in time and will find you there. If I un-follow a friend and then re-follow him - will they get notified on any of them? When you un-follow someone they will not get a notification. Neither if you re-follow a friend. (source)
H: How do I go to/highlight a specific cell ID in Google Sheets? Say I am on A1, and I want to instantly go to/highlight/focus Z99. How would I go to that cell ID (or row/column) with a keyboard shortcut or within the menu or context menu? There is Ctrl+G for Excel but that only opens a find box in Google Sheets. It doesn't seem like this feature exists as I have searched for a bit now, but hopefully it does. AI: Google Sheets doesn't have a similar shortcut. You could create a macro / script, a URL query, or use an add-on that add this feature. URL query Maybe the easiest is to use a URL query, on the browser address bar just add &range=Z99 to the spreadsheet URL and press enter. Macro / Script Please read Extending Google Sheets and Google Sheets Macros Here is a simple script. Adopters could add the validations that works best for them. If we add it as a macro we could assign a keyboard shortcut to call it in the form Ctrl + Alt + Shift + Number (Tools > Macros > Import then Tools > Macros > Manage Macros). function GoTo() { var spreadsheet = SpreadsheetApp.getActive(); var Ui = SpreadsheetApp.getUi(); var buttons = Ui.ButtonSet.OK_CANCEL; var response = Ui.prompt('Go to', 'Where do you want to go?', buttons); if(response.getSelectedButton() === Ui.Button.OK){ var address = response.getResponseText(); spreadsheet.getRange(address).activateAsCurrentCell(); } }; Gist Reference Keyboard shortcuts for Google Sheets
H: Does YouTube favor some users' comments more than others it doesn't take much time on YouTube scrolling through the comments to find someone writing a comment and barely being noticed, and someone else copies his comment and gets all the attention and even loads of likes, or those certain accounts that have their comments always on top, ignoring YouTube's broken "top comments", those users might be above others with thousands of likes! I'd like to know why, why would YouTube favor some users on others, I've done my research and heard that YouTube makes your comments appear more the more you post comments, but it doesn't seem plausible to and it wasn't from a site you could trust because I've never seen someone else say that, other than that I've failed to find any results. AI: "Top comments" aren't just "comments that got the most upvotes". A system like that is inherently suceptible to preferential attachment, as you can see eg. on reddit. Instead, YouTube tries to show you comments that they think aren't toxic and are relevant to you. This means in particular that: Your own comment(s) always gets shown to you at the very top. Comments from people you are subscribed to get sorted higher. (This was advertised as one of the main benefit when the system was changed when the Google+ integration happened) Toxic comments get sorted lower. New comments get sorted higher, old ones lower. Likes get sorted higher, dislikes get sorted lower. There likely are a lot more factors playing into this - a person often participating in the community being sorted higher than a random person dropping in wouldn't be too far fetched of a metric being used. Overall, as long as YouTube doesn't say how their comment algorithm works, we won't know whether certain users get preferred for everyone.
H: Google Sheets Query(Importrange) with named range? I am looking for a way to query an imported range using named range. Something similar to this, however I cannot makeit to work Sheet ID#A has a column J whose named range is "Signed" that may contain the following character '☑' Sheet B uses the following formula: =query(IMPORTRANGE("https://docs.google.com/spreadsheets/d/ID#A/", "Form Responses 1!A:ZZ"),"select * where Col"&MID(CELL("address",Signed),2,1)&" = '☑' ") The the cell containing the formul will show NAME#? and hovering the tooltip will state "Unknown range name: 'SIGNED'." Any clue? AI: IMPORTRANGE only imports range values, it doesn't import named ranges. NOTE: Suopose that the named range Signed is on the same spreadsheet file that your QUERY formula. It still will not work because MID(CELL("address",Signed),2,1) returns the column letter instead of a column number. Replace that formula with COLUMN(Signed)
H: Copying data with two criteria in sheets I am trying to copy data from one worksheet to another if the data meets two criteria. First it has to match the date, then it has to fall within a four hour time frame. Once both are met the data will copy to a certain cell in one worksheet from the master worksheet. I have tried the IF function but I do not know how sheets interprets time. Also i have researched how to do this but everything i find about multiple criteria does not include time or date. Any help would be greatly appreciated. The following link is to some dummy data so you can see kind of what im looking for. https://docs.google.com/spreadsheets/d/1U3336UidAEtsQF45tHF3391net8AOpXPcJhgVveCJ-A/edit?usp=sharing AI: I have inserted two worksheets on your sample, one named Master and the other Results. In Master, I have simply copied the original data. In Results, I copied the results table and added a helper row and a helper column. The helper row contains the hours in number format (0400 to mean 00:00-04:00, 0800 to mean 04:00-08:00, etc) and the helper column contains the value from column D for the same row. I will mention here that it would be simpler to make the two worksheets have matching row data. Then in cell C4 of Results, I used the formula: =if(sum($B4:B4)=$B4*2,"",if(Master!$B4<C$3,$B4,"")) If I have to break it into smaller parts: if(Master!$B4<C$3,$B4,"") is responsible for ensuring this cell is the appropriate cell (with respect to the time) in which the value has to be inserted, and if(sum($B4:B4)=$B4*2 verifies if we already inserted a value in a previous cell on the same row. I highlighted some cells in cream; those would also have values if it wasn't for this part.
H: How to show which column has the first amount and count columns to reach a sum amount I am working on a Google sheet that shows a sum that has been advanced to a customer and then shows the income per month the customer receives. We will retain 100% of the income until the amount that has been advanced is repaid. I am trying to come up with two formulas for this spreadsheet which will work on each row: in column C that returns the first month that revenue is earned by the client and in column D that returns the number of months over which the client revenues pay back the advance listed in column B. My research suggests that this is probably possible using an array function but I can't seem to find an example and don't understand the syntax enough to make it work. AI: I would suggest using some helper columns for the second part. This said, for the first part, I propose this formula: =index($E$2:$P$2,match(false,isblank(E3:P3),0)) For the second part, I propose this formula (note it has dependents on the helper columns) =datedif(C3,index($Q$2:$AB$2,match(true,Q3:X3>=B3,0)),"M")+1 The helper columns only have running totals (adds up everything up to but excluding the current month). Datedif finds the difference between two dates, and in the above, will return that difference in months. Spreadsheet sample EDIT: Added the formula for running totals for the second part, which works without the helper columns: =DATEDIF(C3,index($E$2:$P$2,match(true,MMULT((column(E3:P3)<=transpose(column(E3:P3)))*E3:P3,transpose(SIGN(E3:P3)))>=B3,0)),"M")+1 This bit: MMULT((column(E3:P3)<=transpose(column(E3:P3)))*E3:P3,transpose(SIGN(E3:P3))) Returns an array containing the running totals, referenced from this website and adapted to a row (the website uses a column of values and explains in fairly good detail how it works).
H: How to select random cells in a row that add up to 300, and count how many it took I have a column that contains a bunch of random integers, I would like to select a number of those cells until they add up to, or just over 300, then output the count of how many rows it took to make 300. Col 1 | Col 2 ------------- 38 | =countOfRandomlyPickedRowsFromCol1ThatAddUpTo300() 44 | 32 | 78 | 12 | 2 | .. | 23 | 2 | Update: ended up writing this, does what I need. function getTotalWeeks( runCount ) { // Make is sleep Utilities.sleep(1000) // Get the spreadsheet var spreadsheet = SpreadsheetApp.getActive(); // Do we have runCount? var runCount = (runCount === undefined ? 999 : runCount) // Get the vars var vars = spreadsheet.getSheetByName('Variables'); var total_stories_r = vars.getRange('E7'); var total_stories = total_stories_r.getValue() // Get the week sims var monte = spreadsheet.getSheetByName('Montecarlo run'); var possible_velocity = monte.getRange('A2:A'); var data = possible_velocity.getValues(); var weeks_arr = [] // Print for the run count for (var ii = 0; ii < runCount; ii++) { var total = 0 for(var weeks = 0; weeks < data.length; weeks++) { var element = data[Math.floor(Math.random() * data.length)]; // Random elent from Array total = +total + +element // + unary operators to convert strings to ints if (total >= total_stories) { var bollocks = [] bollocks.push(weeks) weeks_arr.push(bollocks) break; } } } // Put it all back var range = monte.getRange("B1"); range.setValues([["Number of weeks"]]) var range = monte.getRange("B2:B1000"); range.setValues(weeks_arr); } AI: Update: ended up writing this, does what I need. function getTotalWeeks( runCount ) { // Make is sleep Utilities.sleep(1000) // Get the spreadsheet var spreadsheet = SpreadsheetApp.getActive(); // Do we have runCount? var runCount = (runCount === undefined ? 999 : runCount) // Get the vars var vars = spreadsheet.getSheetByName('Variables'); var total_stories_r = vars.getRange('E7'); var total_stories = total_stories_r.getValue() // Get the week sims var monte = spreadsheet.getSheetByName('Montecarlo run'); var possible_velocity = monte.getRange('A2:A'); var data = possible_velocity.getValues(); var weeks_arr = [] // Print for the run count for (var ii = 0; ii < runCount; ii++) { var total = 0 for(var weeks = 0; weeks < data.length; weeks++) { var element = data[Math.floor(Math.random() * data.length)]; // Random elent from Array total = +total + +element // + unary operators to convert strings to ints if (total >= total_stories) { var bollocks = [] bollocks.push(weeks) weeks_arr.push(bollocks) break; } } } // Put it all back var range = monte.getRange("B1"); range.setValues([["Number of weeks"]]) var range = monte.getRange("B2:B1000"); range.setValues(weeks_arr); }
H: Concatenate Car Parts Data I currently have a list of car parts that I'm trying to get into a specific format so I can import. Example of Data Set MAKE MODEL YEAR PART Make1 Model1 1950 Part1 Make1 Model1 1950 Part2 Make1 Model1 1951 Part1 Make1 Model1 1951 Part2 Make1 Model1 1951 Part3 Make1 Model1 1952 Part1 Make1 Model1 1952 Part2 Make1 Model2 1950 Part1 Make1 Model2 1950 Part2 Make1 Model2 1951 Part1 Make1 Model2 1951 Part2 Make1 Model2 1951 Part3 Make1 Model2 1952 Part1 Make1 Model2 1952 Part2 So for each Make, Model, and Year combination I need to have all the products matching that combination in one cell. For example, this is the desired table result from the initial data set. MAKE MODEL YEAR PART Make1 Model1 1950 Part1,Part2 Make1 Model1 1951 Part1,Part2,Part3 Make1 Model1 1952 Part1,Part2 Make1 Model2 1950 Part1,Part2 Make1 Model2 1951 Part1,Part2,Part3 Make1 Model2 1952 Part1,Part2 The catalog has close to 10,000 variations. Anybody have a solution for this? I've tried playing around with MATCH and VLOOKUP, but had no success. Any assistance would be greatly appreciated. AI: E2: =UNIQUE(A2:C) H2: =ARRAYFORMULA(TEXTJOIN(",",1,IF((E2=A:A)*(F2=B:B)*(G2=C:C),D:D,))) Copy/Paste(or Drag Fill) rest of H2:H
H: Google search bug? When I insert this URL in the browser's address field: https://www.google.com/search?q=notepad++.exe then the plus characters are replaced by space characters in the Google search field: How can this bug be avoided? AI: This isn't a bug - when encoding URLs, the character set becomes more limited, meaning that there needs to be a way to represent the full character set that is now unavailable. A plus (+) is used to mark a space - you will also see a space encoded as %20. A question mark (?) is often used to separate the resource path and the query string. A percent sign (%) is used to initiate the escape sequence. If you want to make use of a literal + then you must escape it, using the standard %xx sequence, and providing the hex value for the character. In this case, you want to represent a +, the ASCII value for which is 43 decimal, or 0x2B hexadecimal. This means that you need to use %2B in place of the +. Similarly if you want to represent a literal %, then you must "escape" it, because it is used to initiate the escape sequence... you must use %25 in place of a %. Research "URL Encoding" to find out more Try entering notepad++.exe into the box on this page: HTML URL Encoding Reference.
H: How to share a file on Drive and allow only to download instead of ask for granting permissions? I wish I could share files with non owners but I don't wish to allow the users to ask for granting modification access. I triggers unwanted emails to a manager that wants to keep his e-mail as the document owner for marketing purposes but do not wish to be kept posted by users who doesn't fully understand that they are supposed only to download the files. Do anyone have any clue on that? AI: At this time it's not possible but instead of using the default URL you could replace /view by /copy this will make that the user will see a page showing a "Make a copy" button instead of the file and the button to request access.
H: How do I whitelist a Google Mail address while still blocking a key spam-word? I have a fairly substantial Google Mail filter list, probably around sixty entries in total, the vast majority of which block mail using the action "Mark as read, Delete it." Three of these rules block any inbound email containing the word "survey" in the sender address, subject, or body of the message respectively. None of the people I do business with use this word in the context of day-to-day conversation so it rarely triggers a false positive, and it blocks the constant barrage of surveys that companies want me to fill out. But recently, I activated email notifications from Amazon's "hub" (thehub@amazon.com) to notify me when I have a package waiting and as luck would have it, their notification template actually does contain the word "survey." I want to see these messages in my inbox so I whitelisted sender thehub@amazon.com using the action "Never send it to Spam, Mark it as important." What's the proper way to ensure that my whitelist rule takes precedence over the survey-blocking rule, given that all notifications from thehub@amazon.com will contain the word "survey?" AI: Update your "survey" filter to disregard that email address: from:(-thehub@amazon.com) survey
H: How to delete all emails older than a certain date in gmail? Suppose I want to delete all emails older than year 2012 in gmail. Currently, what I do is put Before: 2012 in the search box. However using this method, I have to delete the emails 100 conversations at a time. This is time-consuming and tiring on my finger muscles. How can I delete all emails older than year 2012 in gmail in one stroke? EDIT: The answer in the possible duplicate no longer works. I am no longer able to select all conversations. Emails have to be selected and deleted 100 conversations at a time. AI: Do like you did before: put Before:2012 in the search box, select all messages using the checkbox at the top left. And then look at the top of messages (below Gmail toolbar), there should be the following message: All 100 conversations on this page are selected. Select all conversations that match this search Click the link.
H: Clear the contents of the active sheet I'm trying to clear the contents of certain cells in the active sheet of my google sheets spreadsheet. Here's what I have so far: function Reset() { var sheet = sheetName(); var range = sheet.getRange("B4:G53"); range.clearContent(); } function sheetName(){ return SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName(); } I get this error: TypeError: Cannot find function getRange in object Copy of 5.7.18. (line 4, file "Code") What am I doing wrong? AI: The problem is that your variable sheet doesn't make reference to a Class Sheet object. Change return SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getName(); by return SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
H: Preventing text on pause when in full screen mode on YouTube? When in full screen mode and pausing YouTube the player usually display some text (Likely related to other content) across the top of the viewer. Example screenshot included. This prevents seeing details related to the content. Anyone know how to block / disable this? Example pasted below: AI: You can open the developer tools (even in full screen mode), search for a div with those exact classes: ytp-chrome-top ytp-share-button-visible - and delete it. It's the top row of the YouTube video, including the title and buttons. If you only wish to delete the title - match the div with the class ytp-title-text. A more clever way, would be to create a user script that delete this div, or hides it when in full screen (or any other time you want), it should be rather easy. Demonstration GIF (too big to attach here) Simple "scripts" Run it from the DevTools console: It will work upon loading - no need go to full screen first. $('div.ytp-chrome-top.ytp-share-button-visible').remove() OR document.getElementsByClassName('ytp-chrome-top ytp-share-button-visible')[0].remove() Use this as a bookmarklet to toggle the visibility of the video title bar: $('div.ytp-chrome-top.ytp-share-button-visible').hidden = !$('div.ytp-chrome-top.ytp-share-button-visible').hidden;
H: Firebase Dynamic Link service -- I can't understand exactly what it's about I read the news that Google has shut down his short linker service goo.gl and the fact that FDL APIs will be used instead. And I've watched a video about the matter. However, I still can't comprehend how the Firebase Dynamic Link service better than that goo.gl? Can anyone give me real world examples of using it? AI: If you have been creating links by going to goo.gl then Google recommend using an alternative service, FDL is targeted at developers. For developers, the advantage of FDL is that it can link to a mobile app as well as a website. For example an FDL shortened Twitter link will open twitter.com if used in a browser, but will open the Twitter app if used on an Android phone. In this way the links are "smart".
H: Why can I send e-mails with Amazon SES only to verified e-mail addresses I verified a domain and a single e-mail address on that domain in Amazon SES. When using the "Send test email" function or trying to send e-mails via SMTP I can only send mails TO that one verified e-mail address. This is not really helpful. How can I send e-mails to any other e-mail address from Amazon SES? AI: I’m guessing it’s due to being in the Amazon SES sandbox. According to this AWS page, To addresses also need to be verified if you’re within the sandbox.
H: how to apply script on specific sheets within a spreadsheet? script (attempt): function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('P1!B10'); source.copyTo(ss.getRange('P1!B11'), {contentsOnly: true}); } function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('P2!B10'); source.copyTo(ss.getRange('P2!B11'), {contentsOnly: true}); } function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('P3!B10'); source.copyTo(ss.getRange('P3!B11'), {contentsOnly: true}); } function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('D1!B10'); source.copyTo(ss.getRange('D1!B11'), {contentsOnly: true}); } function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('D2!B10'); source.copyTo(ss.getRange('D2!B11'), {contentsOnly: true}); } function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('D3!B10'); source.copyTo(ss.getRange('D3!B11'), {contentsOnly: true}); } function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('P!B10'); source.copyTo(ss.getRange('P!B11'), {contentsOnly: true}); } in one spreadsheet I have these sheets "P1, P2, P3, ..., P" and in every sheet I have a button. next, I need to achieve that if I am in let's say sheet D1 and press button in that sheet a script will execute. AI: got it... function moveValuesOnly1() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange("P1!B10"); source.copyTo(ss.getRange("P1!B11"), {contentsOnly: true}); } function moveValuesOnly2() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange("P2!B10"); source.copyTo(ss.getRange("P2!B11"), {contentsOnly: true}); } function moveValuesOnly3() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange("P3!B10"); source.copyTo(ss.getRange("P3!B11"), {contentsOnly: true}); } function moveValuesOnly4() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange("D1!B10"); source.copyTo(ss.getRange("D1!B11"), {contentsOnly: true}); } function moveValuesOnly5() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange("D2!B10"); source.copyTo(ss.getRange("D2!B11"), {contentsOnly: true}); } function moveValuesOnly6() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange("D3!B10"); source.copyTo(ss.getRange("D3!B11"), {contentsOnly: true}); } function moveValuesOnly7() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var source = ss.getRange('P!B10'); source.copyTo(ss.getRange('P!B11'), {contentsOnly: true}); }
H: How to Aggregate and Pivot Simultaneously With Google Sheets Query Hey I am trying to transform a table from this: Into this: Basically for each "Type" I want the totals for the different values for "Exists" which right now is just TRUE and FALSE. But I can only get to this so far: I did that using the following QUERY SELECT B, C, COUNT(C) GROUP BY B,C I know the next step requires a PIVOT but I'm having some fundamental misunderstanding about how PIVOT works to get anywhere. If you could help me out with some understanding and not just give me the answer it would be great. AI: The QUERY function's query statement doesn't allow using the same column to group, aggregate, and pivot data. The workaround is to add an additional column that is a duplicate of the data in C. This can be done in the range or in the formula. Duplicate in Range This formula requires creating a new data column D that is a duplicate of C: =QUERY(A1:D7,"SELECT B, COUNT(C) GROUP BY B PIVOT D", 1) Duplicate in Formula In this approach the duplication is done using an embedded/inline array within the formula therefore it doesn't require changing the source data. You must use Col1 notation with this approach. eg. Col1, Col2, Col3, instead of A, B, C. Example using your data range, A1:C7: =QUERY({A1:C7, C1:C7}, "SELECT Col2, COUNT(Col3) GROUP BY Col2 PIVOT Col4", 1)
H: Querying if cells exist in an external Google Drive file I have a huge list of names stored in Google Drive as a TXT file (constantly updated externally). Can I put a small list of names in a Google Sheet and see if any of them exist in the big external list? I thought about doing something like: A B 1 https://... =REGEXEXTRACT(A1, "d/(.+)/") 2 Name Match 3 Joe Smith =if(iserror(query(IMPORT*X*(A$1), concatenate("where lower(A) = lower('", A3, "')"))), "Not found", "Found") 4 Jane Smith =... 5 Foo Bar =... (A1 will look like https://drive.google.com/file/d/1234abcd/view) I've tried different *X* (like IMPORTDATA), but it always returns "Not Found". If I change URL to https://drive.google.com/uc?export=download&id=1234abcd then it returns #N/A even though it does exist. Please advise how to accomplish this goal and hopefully quickly (without loading the entire huge file in each and every row). BTW, I guess I can turn the TXT file into CSV if I must. You can also answer with a custom Google Apps Script function like =external_match(a3, b$1), if you think it's better. AI: As I've mentioned, maybe GAS is the only way to go here. But as @Rubén mentioned, they can't be custom. So my solution is run a function, which I called "checker", via a drawing or a menu. The function called "reset" is just there as a quick way to delete the list of names. The biggest advantage with this approach is that the external file is called just once! I've even made it display (in C2) the external file's last modified date so the users will know if the match is based on current data or not. The Spreadsheet structure is: A B C 1 ID/Name https://... =REGEXEXTRACT(B1, "d/(.+)/") or just filename.txt 2 Charset UTF-8 3 4 Name Match 5 Joe Smith =... 6 Jane Smith =... 7 Foo Bar =... (Cell B1 is either a link like https://drive.google.com/file/d/1234abcd/view or a file name - my function will take the first file with that name) function reset() { var spreadsheet = SpreadsheetApp.getActiveSheet(), firstrow = 4; spreadsheet.getRangeList(["a" + firstrow + ":b", "c2"]).clearContent(); } function checker() { var regex = '^{value}$', regex_mod = 'mi', file, found, name = '.', id, value, charset, spreadsheet = SpreadsheetApp.getActiveSheet(), popup = SpreadsheetApp.getUi(), i, firstrow = 4, maxrows; spreadsheet.getRange("b" + firstrow + ":b").clear; maxrows = spreadsheet.getMaxRows(); id = spreadsheet.getRange('c1').getValue(); charset = spreadsheet.getRange('b2').getValue(); if (id.indexOf(name) == -1) file = DriveApp.getFileById(id); else file = DriveApp.getFilesByName(id).next(); spreadsheet.getRange("c2").setValue(file.getLastUpdated()); if (charset == null) file = file.getBlob().getDataAsString(); else file = file.getBlob().getDataAsString(charset); for (i=firstrow; i<=maxrows; i++) { value = spreadsheet.getRange(i, 1).getValue(); if (value == '') break; value = new RegExp(regex.replace('{value}', preg_quote(value, '')), regex_mod); spreadsheet.getRange(i, 2).setValue(value.test(file)); } } function preg_quote (str, delimiter) { // eslint-disable-line camelcase // discuss at: http://locutus.io/php/preg_quote/ // original by: booeyOH // improved by: Ates Goral (http://magnetiq.com) // improved by: Kevin van Zonneveld (http://kvz.io) // improved by: Brett Zamir (http://brett-zamir.me) // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman) // example 1: preg_quote("$40") // returns 1: '\\$40' // example 2: preg_quote("*RRRING* Hello?") // returns 2: '\\*RRRING\\* Hello\\?' // example 3: preg_quote("\\.+*?[^]$(){}=!<>|:") // returns 3: '\\\\\\.\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:' return (str + '') .replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&') }
H: How can I view all the messages I posted in a Slack channel? How to view all the messages, that I posted in a specific Slack channel? I'm referring to the Slack website and not the Slack desktop program or phone application. AI: This seems to do the trick: from:me in:#random ... to list all messages I've posted in #random
H: How do you exclude chat when applying label via filter in Gmail? I want to create a filter in Gmail that has the rule to:me -cc:me but I only want it to apply to emails, not Hangouts chat messages. When I try to include -in:chats in my filter Gmail warns me that this will not work... Filter searches containing "label:", "in:", "is:", date range (e.g. "before:" or "after:") or stars criteria (e.g. "has:yellow-star") are not recommended as they will never match incoming mail. Do you still wish to continue to the next step? Is there some other filter criteria that I can use which identifies the message type as email only? AI: You can follow this url. Basically, if you use the advanced filter option, you can check the box that says "Don't include chats".
H: I mistakenly closed a direct message window on Slack. How can I re-open it? I mistakenly closed a direct message window on Slack. How can I re-open it? I clicked here: AI: Just re-open a direct message with the same person. The conversation history will still be there. On the same screen where you can start (or find) a direct conversation, there should be a list of recently active conversations. If you've forgotten which conversation you've closed you should be able to find it there.
H: Why is my =VLOOKUP function returning #N/A for the first cell? I'm trying to build a spreadsheet in Google Sheets to calculate a list of charges that should be oncharged to child companies (expenses are paid for by a holding company, and oncharged). My idea for this was to create a list of expenses, and indicate what % of the expense applied to each company. I'd then create a separate sheet (as a 'tab') for each company, and do a =FILTER to find items where the % of the expense allocated to that company is greater than zero. I'd then =VLOOKUP the item found earlier, to find the exact total to charge. Here's what I've got: And here's what the second sheet looks like: My formula for the FILTER is: =FILTER('Paid by Parent Company'!A3:A1000, 'Paid by Parent Company'!C3:C1000 > 0) My formula for the VLOOKUP is: =VLOOKUP(A3, 'Paid by Parent Company'!A:E, 2) * VLOOKUP(A3, 'Paid by Parent Company'!A:E, 3) I'm getting the error #N/A in cell B3 (the first VLOOKUP cell), but all the other cells below it with the same formula are working. How can I prevent/solve this error? AI: It looks like for each Child Company you have a unique invoice sheet - i.e. the lookup formula doesn't need to work out for itself which column of costs to look at because you typed in '3'. That makes the solution easier. Use INDEX-MATCH rather than VLOOKUP. It's more robust and also quicker once you get very large spreadsheets. In B3: =INDEX('Paid By Parent Company'!$C$3:$C$6,MATCH($A3,'Paid By Parent Company'!$A$3:$A$6,0)) * INDEX('Paid By Parent Company'!$B$3:$B$6,MATCH($A3,'Paid By Parent Company'!$A$3:$A$6,0)) For the other invoices, change the range reference of $C$3:$C$6 to $D$3:$D$6 etc. Also, check that B3 and C3 are both formatted as numbers not text; that could be killing your formula.
H: Using UNIQUE and SUM for all possible values in Google Sheets I have a much bigger and more serious table just like this one: As you can see there are more possible category than I use. What I want to achieve is listing all the categories (even ones that does not currently in use) and SUM the values corresponding with the categories. I would like to see this for every category automatically: So far I tried to use UNIQUE(B2:B) but it only lists categories in use (it makes sense though) Also I done this: =SUM(FILTER(A2:A;B2:B = G2)) and copied it downwards. It SUMs all categories fine, but I have to copy to formula by hand at every new category. So my sheet looks like this now: Question: Is there a way to do this fully automatically? Same as =UNIQUE() generates a list automatically in a column it would be nice to generate the SUMs next to it in one formula. Because as new categories come I have to manage the SUM column by hand every time I notice it has no calculation for given category. AI: =QUERY(A:B,"Select B,sum(A) where B is not null group by B",1)
H: Is the new Gmail just a modernization of the interface? I use G Suite for 12 years now and started with the Gmail interface which did not change that much until now. I then moved to Inbox as it was bringing in brand new functionalities (especially the automatic classification for interesting areas such as travel). Then the new Gmail came in recently (I noticed it today on my G Suite console) and gave it a try. As far as I can tell, this is exactly the old Gmail with a better looking interface. Functionality wise nothing has changed (except for the addition of shortcuts on the right). In particular, the Parameters section is exactly the old one (it almost looks like an iframe with the old content). Has any new major functionality been added? I was hoping for some kind of mashup between the old Gmail and Inbox, but did not find anything new so far. AI: A quick search reveals that it's more than simply a shiny new interface. (Start with the Google Blog, for instance.) Some of the new features include: Confidential Mode: Send email with expiration dates or revoking previously sent messages. Also allows the option to prevent copying, forwarding, downloading, or printing. Smart reply - Offers options for quickly replying based on the context of the message and your previous responses. Nudges - reminds you of messages you may have forgotten about, or replies you're still waiting on. Tighter integration with Calendar, Keep, and Tasks. Also, Tasks has been resurrected and refreshed. Native offline capabilities (no longer requires a browser extension) Action icons in the conversation list - hover your mouse over a row and buttons to archive, delete, mark as read, or snooze. Calendar invitations add buttons for RSVP and decline. Snooze - this is directly ported from Inbox. Plus mentions - add someone to your CC list without leaving the body of your message. Hit + and choose the name from your contacts. Attachments now offer a button in the conversation list too, so you can open an attachment without opening the message. For mobile, there's high-priority notifications. Certain messages that the AI has learned are important will send you a push notification on your Android or iOS device.
H: Secure sharing of data between Google Sheets I am currently helping a company with their booking system. It uses Google Sheets. I know that data can be shared between sheets. I am wondering if data can be shared between sheets, such that sheet A references sheet B. sheet A is readable by user, sheet B is not readable by user. I realise that with conventional file security this is impossible. However because Google Sheets is hosted, it could be done. (like Unix set UID/GID (on executable files): Sheet A and B are owned by user U, who has all permissions, user V has read on sheet A. User U adds set GID to this copy of sheet A.) So is it possible using Google Sheets? AI: This is what I have found out. Add formula =importRange(«url of file B»,«range») to file A. This makes the content of part of one file appear in the other (the one with the formula. Share file A, read only (Do not give edit/write permissions. If you give edit/write permission then they can gain read access to the other file, my editing or adding an importRange function).
H: Why using wildcard DNS record in Github Pages custom domain will allow anyone to host at one of my subdomain? When setting up custom domain for my Github Pages by following https://help.github.com/articles/setting-up-a-custom-subdomain/, I encountered the following warning: Danger: Do not use wildcard DNS records (e.g. *.example.com) with GitHub Pages! A wildcard DNS record will allow anyone to host a GitHub Pages site at one of your subdomains. While the warning is very clear: avoid wildcard DNS records, I would like to know how it is possible for another user to host their GitHub Pages using my subdomain even when I'm specifying my own domain YOUR-GITHUB-USERNAME.github.io as CNAME value. AI: A CNAME is just an alias used by the browser to look up the IP address of a website - the server still only sees the original address (e.g. docs.example.com). In fact, all YOUR-GITHUB-USERNAME.github.io domains are just CNAMEs that point to the same DNS record. This means when a request comes to GitHub, there is no way to tell from the header which GitHub pages it should return. It knows which site to serve based on the settings configured in the repositories. This means that if you have a wildcard *.example.org DNS entry pointing to GitHub, anyone can add a CNAME setting to their repository (such as evil.example.org) and GitHub will serve requests made to that CNAME.
H: Google Sheets - Fetch random value from array for each new line created with form I have a Google Form that fills up a new line with values in Sheet1!, column A and column B. I am trying to create an =ARRAYFORMULA function in column C, which will populate the C cell in each new line created by the form with a random value, fetched from an array of cells in Sheet2!A1:A8. The closest I got to doing it is with this array formula I placed in Sheet1!C1 =ARRAYFORMULA(IF(A:A="","",INDEX({Sheet2!A1,Sheet2!A2,Sheet2!A3,Sheet2!A4,Sheet2!A5,Sheet2!A6,Sheet2!A7,Sheet2!A8},RANDBETWEEN(1,8)))) It indeed enters a random value from Sheet2!A1:A8, however, the problem is that it changes all the previous values in column C to the same new random value it fetches for each new line created by the form. What I need is that each new line created by the form will receive a different random value from the array. Any ideas anyone? AI: A script might be your best option because on each change, any random functions are reevaluated. Go to Tools > Script editor and paste in the following script. // Append a random value from an array when a form is submitted. // The event parameter, e, contains the range data to append to the correct row. function append(e) { var ss = SpreadsheetApp.getActiveSpreadsheet(); // get the form data coming in. var inputSheet = ss.getSheetByName('formData'); // Get the array of random values from sheet 2. var randVals = ss.getSheetByName('Sheet2').getRange("A1:A8").getValues(); // Get the range of the added row to the spreadsheet. Add one to the last column value so you're appending to col 3. var row = e.range.getRow() var col = e.range.getLastColumn()+1 // Insert a random value from the values array to the correct row and column. inputSheet.getRange(row, col).setValue(randVals[Math.floor(Math.random() * randVals.length)]); } Once the script is in, go to Edit > Current project triggers and add a new trigger. Choose "from spreadsheet" and "on form submit" and the save. Now, when your form is submitted, a random string from Sheet2 will be added to the last column of the spreadsheet.
H: Add a CheckBox with a script How can I use a script to add a CheckBox to a Sheet? This is probaly trivial but I could not find a single example online and the CheckBox class isn't even mentioned in the docs. From the GUI, I would go Insert -> CheckBox. Setting the value of the cell to either TRUE or FALSE doesn't work. AI: Short answer Add the checkbox from the Google Sheets UI, then use one of the copyTo methods of Class Range. Explanation NOTE: On April 19, 209 Google included on the Google Apps Script release notes the requireCheckbox method. See more details on my other answer. The Google Apps Script Spreadsheet service doesn't include a methods for everything that could be done through the Google Sheets user interface. This is the case of the Insert > Checkbox which is a pretty new feature. Even the Record macro feature can't do this. The following was recorded one momento ago /** @OnlyCurrentDoc */ function InsertCheckbox() { var spreadsheet = SpreadsheetApp.getActive(); spreadsheet.getRange('A1').activate(); /* * Added to show the missing Insert > Checkbox step */ spreadsheet.getRange('B1').activate(); spreadsheet.getRange('A1').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false); }; NOTE: If you don't want to pass all the cell properties (borders, formulas, background, etc. instead of SpreadsheetApp.CopyPasteType.PASTE_NORMAL use SpreadsheetApp.CopyPasteType.PASTE_DATA_VALIDATION. Related Q on Stack Overflow Placing checkboxes in Google Sheets using Apps Script
H: How to cancel “Hide user from channel” on Youtube comment? I accidentally clicked "Hide user from channel" on a Youtube comment of one of my videos. This seems to have the consequence of shadowhiding it (i.e. the user who posted the comment still sees it, but not the other users) How can I cancel it? I don't find the option in Youtube to revert this action. AI: You can find your hidden users in the YouTube Studio > Settings > Community
H: What's the difference between Favorites, Want to go, and Starred places? Does it make a difference where I save places? AI: Those are the three "core" lists that Google Maps supplies and I guess that theoretically they have different purposes. The main difference is about the options available for each list, for example, the Favorites can't be hidden from your map, and the Starred places can't be shared. The available options: Favorites: ❌ Hide ✅ Share Want to go ✅ Hide ✅ Share Starred places ✅ Hide ❌ Share The edit options is of course available for all lists, and the delete options is available only for user-created lists. So it makes a difference where you save it only if the available options make difference to you for different scenarios.
H: Short shareable URL for aliexpress item? Are builtin short URL's to share an item available in aliexpress? If so, what's the format? (Something like eBay has /itm/xxxxxxx) AI: The shortest form of an AliExpress item's URL is: aliexpress.com/item/XXXXXXXXXXX.html Notes: This is without making use of any third-party services which may inject affiliate codes. Prior to a change in 2020, the format used to be aliexpress.com/item/-/XXXXXXXXXXX.html, where the dash was used in place of the item's name in the URL. This part of the url is no longer necessary and at the time of writing, will be redirected to aliexpress.com/item/XXXXXXXXXXX.html, but don't rely on this always being the case.
H: Heroku deployment Please can someone tell me what Heroku actually is ? I read that it is a cloud based web server for app deployment , but what does that mean . What can i deploy there , what should / should'nt deploy there . I know it's pretty easy to deploy a nodejs app there . But is it the same for static websites for exemple. Should i deploy bootstrap only project there ? Can i actually do that ? Can i deploy Laravel project on Heroku ? When should i use it ? AI: What Heroku is ? Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. What does that mean ? It means you can you can deploy your Web Application on their server and use their resources to host your website. What can you deploy there ? It supports most of the platforms for hosting your Web Application like Node JS, Python, Go lang, Ruby etc. You can check that on their website Why shouldn't you use it professionally ? It's expensive than it's competitors like AWS. Is it same for static website ? Well actually heroku doesn't support hosting basic websites consisting of only HTML, CSS and JS. But there are some ways in which you can trick heroku into thinking our website is a PHP app. Here's some more info about it. Can you deploy Laravel project on Heroku ? Yes you can do that. Here's the guide on deploying Laravel on heroku.
H: How can I stop YouTube (or Google) tracking me? I have a feeling that YouTube tries to personalize and control the videos I see on YouTube and also try to gather my information such as real IP address, location, etc. Sometimes even after I logged out, they still try to do that using the gathered information (Maybe using IP address? ... IDK). I understand why they try to do that. However, I do not like that. I like to have a common global (English) video recommendations. Not a personalized one. So, how can I stop YouTube (Google) tracking me and giving me personalized recommendations..? Searched result: https://www.youtube.com/results?search_query=law Full-Size Image: https://i.stack.imgur.com/DjELR.jpg I have already deleted my all activities on Google and disable (pause) all activities including YouTube Search History, YouTube Watch History, Device Information, Location History, etc. I also use a VPN connection and I have already added _optout_nomap to WiFi SSID. But I still feel like they are tracking me. AI: There are a zillion ways for Google to track you... I discover a new one every day. Apart from the ones you mentioned, here are a few additional ways (which are not necessarily related to your problem with Youtube, and certainly not exhaustive, but which might still be helpful): Stop using closed source software, especially and obviously Google Chrome. You never know what they really record, leak, share, sell. Open source apps' code can be reviewed independently, which is usually better as far as privacy is concerned. Browser fingerprinting. Cookies are just the tip of the iceberg, there are other ways to fingerprint your browser. You can test your browser here. If you use Firefox, I recommend this very good extension, that allows you to either block or - even better - fake the canvas fingerprinting. Stop using 8.8.8.8 as your DNS, since it belongs to Google. Once again, it basically means that they can know every website you visit... Fortunately, there are some safer alternatives, like Quad9 or 1.1.1.1 (well, so they say). You might want to stop using Google search engine, and try DuckDuckGo instead, which is a very solid alternative, and doesn't spy on you. You can also install the DuckDuckGo Privacy Essentials, which helps you block unwanted trackers, especially Google Analytics, which is used by most websites. Obsolete, but worth mentioning: Gmail. Google admitted a few years ago that they read your emails. Apparently, they stopped doing it last year. Also worth mentioning: be careful with the browser extensions you use. Some mine bitcoins secretly, some pretend they remove ads but actually replace them with others, some probably steal your personal data... I also recommend this very interesting thread on Reddit, cutting Google out of your life. Goog luck!
H: Search for attachment sent to me in Gmail? I know how to search for emails with attachments: has:attachment Which would return both emails from and to me with attachments. However is there any way to search only attachments sent TO me? So it should exclude any emails with attachments that I send out. Any way? AI: How about this query? has:attachment to:me Note : This means that the mails has attachment files AND they are the mails to owner. If you want to use email address, do it like this: has:attachment to:emailAddress Reference : Search operators you can use with Gmail
H: How to skew text in Google drawings? In Google Drawings how can I skew text? Make it lean over to the left or right? I tried dragging the little blue dot but it just rotates the whole text. AI: Select multiple objects > rotate > resize. As shown here https://drive.google.com/file/d/1vT7n3-l3H86MDfWluFyQbFNaXWMciZ3M/view
H: Locating third-party Google Docs web apps I got an e-mail from Google today, warning me to "Remove risky access to your data". According to the security checkup, there are two third-party apps which "have extensive access to [my] personal information and their developers' information hasn't been verified by Google. You should remove their access unless you're sure you trust them." Both apps have the same name, but the page does not provide anything that allows me to access the app. Under "app details" it just says "Unverified developer" and what it has access to. For all I know this could have been something I created for myself and forgot about! It could also be something useful that I wanted to use and in either case it would be silly to remove access without figuring out what it was. However, since there appear to be a duplicate, it's possible they are two versions or attempts to do the same thing, so I need to look closely at both of them to figure out which one to get rid of. I have been searching, but it seems like all my search results only want to tell me how to revoke access, not get more information, However can I locate these apps and figure out exactly what they are so I can make an informed decision? AI: All the scripts/add-ons/web-apps created by yourself by using Google Apps Script should be listed on https://scripts.google.com If it's not listed there and if you are using a G Suite account, it could be an add-on or app added by the domain administrator It it's not listed on https://scripts.google.com and it's an add-on, it should be listed on the add-ons menu of the corresponding Google document editors app Google Documents Google Forms Google Sheets Google Slides
H: How to get rid of new Gmail design? So I've tried new Gmail design. I couldn't believe it was that ugly and unpleasant to use. How to roll back to previous normal Gmail design? New Gmail design: AI: Update: Users report that the rollback option disappears. See my note ↓ From the settings ⚙ button on the top right of your inbox - the first option is Go back to classic Gmail. Note: I believe some day it will be permanent and you won't be able to use the old design anymore. The same as happened with the new calendar.So keep that in mind.
H: Are YouTube likes/dislikes anonymous? Let's say I watched a YouTube video which I found interesting. I would like to upvote it, but I don't want everyone to know that I watched it. Is there any way for anyone outside YouTube to know that I had an of interaction with this video? For instance, could the news below pop up into someone's Google+/something feed? Your friend Robert has liked the video "How to live with an incurable disease" AI: Likes are always private and anonymous. That said, the channel owner always can see the country of origin for likes and dislikes on videos. That information is not available for likes and dislikes on comments though. Google+ has no relation to YouTube anymore. And is dead.
H: Are YouTube comments upvotes/downvotes anonymous? Let's say I watched a YouTube video and notice a comment which I find interesting. I would like to upvote the comment, but I don't want everyone to know that I watched this video. Is there any way for anyone outside YouTube to know that I had an of interaction with this video? For instance, could the news below pop up into someone's Google+/something feed? Your friend Robert has upvoted a comment on "How to live with an incurable disease" Unlike this different question, this is about the comments. AI: Yes, they are anonymous in terms of upvote/downvote, however posting coments can be obviously tracked. Not all services are like FB.
H: Slack - How to add a person to a group chat including the chat's history? I'm chatting with a few coworkers on slack and would like to add another coworker to the chat. The problem is that when I add a new coworker to the group chat, a new group chat is created without the history. Is there a way to add a person to a group chat including the chat's history? AI: https://get.slack.help/hc/en-us/articles/212281468-Direct-messages-and-group-DMs (mirror): When you add people to a DM (Direct Message), a new conversation will start without the previous message history. (If you'd like to keep message history, you can move the group DM to a private channel instead.)
H: How to delete message for everyone after it's been deleted for me What if you wanted to delete a message for everyone, but accidentally pressed delete for me. AI: No luck, you can't delete it for everyone now.Once you delete it for yourself the message disappears and thus you can't delete it again (for everyone).
H: How does Google estimate wait time? According to official docs, Google estimates wait time in places https://support.google.com/business/answer/6263531?hl=en Wait time estimates: Shows how long a customer would have to wait before receiving service during different times of the day, as well as the peak wait time for each day of the week. The displayed wait time is based on patterns of customer visits over the last several weeks. Wait time estimation differs for different business types. For instance, a sit-down restaurant's wait time reflects how long customers wait before being seated. Whereas, a grocery store's wait time reflects how long customers wait to check out their items. How do they do that simply relying on GPS data? AI: It's a combination of: Location data from GPS, mobile network, Wi-Fi and maybe more. You can see in your location history where have you been and see that Google recognizes how long you spent there, with the help of the mentioned data sources. User answers to question regards that place. If I remember correctly, some of the questions Google asks users/visitors about places has to do with waiting times, general time spent in a place etc. More examples when I'll have some - I'm pretty sure that similar questions exists also for bus stations and shops. There's also a question I remember which is something like "How long people usually stay here?" Maybe more things that I'm unaware of. Screenshot examples for 2)
H: DPL3 RegEx: How to suppress display of matched parameters? I'm trying to match {{Tag|Anteater}} Regarding https://help.gamepedia.com/DPL:Parameters:_Criteria_for_Page_Selection#includematch, and https://help.gamepedia.com/DPL:Parameters:_Controlling_Output_Volume#include The DPL statement {{#dpl: |uses=Template:Tag |includematch=/Anteater/ |include={Tag}:1 }} returns the expected page list: ScrapAnteater Scrap3Anteater Problem is, it also displays the parameter "Anteater" after every page-name. How to show only the pagenames, and suppress display of matched parameters, while still matching the parameters? AI: Can be accomplished with the regex replace feature with comes bundled with DPL3. Simple solution: use dplreplace to remove the string. {{#dplreplace: {{#dpl: |uses = Template:Tag |includematch = /Anteater/ |include = {Tag}:1 }} |Anteater}} Robust solution: use format statement to append an arbitrary delimiter before the string you want to remove, to ensure you don't remove the string from any page-titles which happen to contain the same string. However, if the template is transcluded more than once on any page, then the include statement will repeat the parameter for each transclude on that page. Eg ScrapAnteater Scrap3AnteaterAnteaterAnteater Therefor, you'll need to use a wildcard in the replace statement to remove all of them: {{#dplreplace: {{#dpl: |uses = Template:Tag |format = ,\n* %PAGE%·,, |includematch = /Anteater/ |include = {Tag}:1 }} |·.*}} <!-- .* wildcard here -->
H: How to sum all the value inside multiple brackets within single cell in Google Spreadsheet as mention on the title, I am stuck to sum all the value inside multiple brackets within single cell in Google Spreadsheet. Below is the query that must store within single cell: 26b(1), 26a(41), 27b2(17) Basically, the value that I want is "59" ( sum of number 1, 41 and 17 ). Note: if the query above is impossible to find, how about storing the value after equal such as 26b=1, 26a=41, 27b2=17 AI: Formula =ArrayFormula(SUM(VALUE(REGEXEXTRACT(SPLIT(A1,","),"\((\d{1,})\)")))) Brief explanation We could use regular expressions on Google Sheets but it's support is limited. Fortunately Google Sheets has other features that could help to overcome those limitations. The SPLIT function splits the cell value on A1 using a comma as separator. Using ArrayFormula makes REGEXTRACT able to take the SPLIT resulting array as argument and to apply the regular expression to each array member. The result is an array of texts, so VALUE is used to convert them to numbers and finally the SUM function sums those numbers. From REGEXEXTRACT Notes Google products use RE2 for regular expressions. Google Sheets supports RE2 except Unicode character class matching. Learn more on how to use RE2 expressions. This function only works with text (not numbers) as input and returns text as output. If a number is desired as the output, try using the VALUE function in conjunction with this function. If numbers are used as input, convert them to text using the TEXT function.
H: Highlight Rows with Unique Values As Compared to Rows with Same ID# on a Different Sheet I have two sheets: The first is the Master Sheet of responses to a survey. The second will be an Update Sheet auto-generated from the new responses. New responses can be either entirely new rows or edits/updates to previous entries. I am trying to create a Conditional Formatting rule to auto-highlight any rows in the Update Sheet which do not match the corresponding rows in the Master sheet. (A row "does not match" when it shares the same Respondent ID number as the Master sheet row but contains different information in the following cells.) I'm also trying to make it ignore any empty cells. I created named ranges: "Master" and "Update" on each sheet respectively. Here's an image of what I'm trying to accomplish: I'd like to accomplish this without scripts or using a helper column if possible. Any help from you genuine experts out there would be greatly appreciated! And here's the Demo Sheet for reference. So far I have tried to use INDIRECT to accomplish the cross-sheet highlighting (below). However, that didn't work so I'm obviously doing something wrong. CONDITIONAL FORMATTING: - Apply to Range: A3:A200,F5:F200 - Custom Formula: =ISNA(match(A3,INDIRECT("Master!F5:AS"),0)) Update #2: With help from @I'-'I I've been able to get closer with: CONDITIONAL FORMATTING: Apply to range: A3:F200 Custom Formula: =and(isna(match($A3,INDIRECT("Master!F5:F"),0)),not(isblank($a3))) However, while it now highlights the "New Data" rows, it ignores the "Updated Data" row which has the same Respondent ID but different data in the following cells. Any suggestions on how to rectify this would be appreciated! AI: =AND(NOT(ISBLANK($A3)),OR(IFERROR(ARRAYFORMULA(VLOOKUP($A3,INDIRECT("MASTER!F5:J"),COLUMN($A$1:$E$1),0)<>$A3:$E3),1))) VLOOKUP to lookup ID(A3) in the master sheet and return the corresponding 5 columns(5 cells). VLOOKUP results are compared against current row's 5 columns(<>A3:E3). IFERROR to return TRUE if lookup fails(suggesting NewData). ISBLANK to ignore blank rows. AND/OR/NOT Self explanatory. Used to combine TRUE/FALSE in a specific way to achieve intended result.
H: How can I open up PDFs in Google Drive with the Google Chrome PDF viewer? I'm in Google Chrome, but when I click on the PDF in Drive, I can only read it in the Drive viewer. I'd like to be able to read it in the normal Chrome viewer. I know I can download the file and then open it up in the Chrome PDF viewer, but that seems like a workaround. Is there any way to go straight from the file in Drive to the viewing it in the Chrome PDF viewer? AI: Unfortunately it doesn't seem to be possible - check out this thread on Google forums. It seems that the only choice is to connect an app to Google Drive for alternative PDF viewer (which is not the Chrome PDF viewer).
H: How to keep cells "paired" with query results I am using an importrange query from other sheet to filter data: https://docs.google.com/spreadsheets/d/1FbeoKhiJ3jqYXqfIgAK_tHXPZ_Z1Xrm33ulu9gomXuE/edit?usp=sharing The "colors" sheet has data populated from query ("items" sheet) and users are allowed to write comments on each row. Problem: if row order is changed on "items" sheet, the "colors" sheet row order will be lost and any previous comment will not match the correct row. How can I prevent this? Is there a way to keep paired query row results and comments? Maybe using timestamp as a reference? At the moment sheet "colors" contains a correct pairing, once a row is inserted between "items", the pairing is lost AI: Suggested setup Use two sheets, Import and Entry Import sheet Use to import the data to your spreadsheet, Use IMPORTRANGE on this sheet Entry sheet Use to capture, insert comments Add a column for key/id. Add the key/id manually, by writing one by one, using paste as values, a macro/script, add-on or an app that uses the Google Sheets API. Related threads: Copying data to *and from* another sheet based on the month of a date Sync multiple cells so that if any one of them is changed, the others change as well Sync two cells value Use a lookup formula to get the required values from the import sheet by using the key/id column for the lookup, you could use VLOOKUP, INDEX/MATCH among other methods. Related threads: Align the rows of one sheet with the rows of an imported sheet Add the columns that will hold the comments "FAQ" What will happen if a row is deleted from the source sheet (the one that was imported)? The cells on the Entry Sheet that use lookup will show #N/A but the key/id and the columns that hold the comments will remain in place.
H: “This profile is locked” message on Facebook I’m not on Facebook. Recently, when I was looking for one of my friend’s Facebook profile, it displayed a message under her profile picture saying this profile is locked Is this a new Facebook feature? Or is it something else? AI: My guess is it was an accident that made it to production, probably, as it's now gone. I only saw it on mobile facebook in the browser from about 1am-4am last night. I no longer see the message "This profile is locked." When I attempted clicking on the badges. The blue "pill" button linked to https://m.facebook.com/private_sharing/home_view/?entry_point=profile_blue_pill but 404ed. I saw it on everyone's profiles including my own, however was unable to click or load any of these.
H: Can I remove the category labels (social, promotions etc) from Gmail entirely? I've no intention of ever using these labels, but there doesn't seem to be anyway to remove them. It's frustrating as it really clutters up the labels dropdown box, with 5 completely superfluous labels. AI: yes, you can do it easily. just enter settings and hide them all
H: Dial a phone number or allow someone to dial into a scheduled Google Hangout? I scheduled a Google Hangout from Google Calendar (under my personal Gmail account). I'd like to have a way for participants to join it by phone only - either them dialing in or me dialing out to them. How can I do this? I tried installing the UberConference Google Hangouts app, but when I open it, I just see a panel saying that it is loading (have not been able to get it to load). I saw this support article, but I do not see a "call tab" as described. Mac OS 10.12.6 , Chrome Version 67.0.3396.79 (Official Build) (64-bit) AI: As @ale suggested, clicking the "add person" icon brings up this dialog and from there, clicking the phone keypad icon (to the right of the "add names or email addresses" field) brings up another dialog from which you can dial a phone number.
H: LinkedIn: How do you enter a 'carriage return' in the Summary section? How do you enter a carriage return (line break) in the Summary section of a LinkedIn profile? I've tried the 'enter' key and hitting spaces and nothing works. It just eliminates the carriage returns and spaces and truncates everything. I want a profile a Summary that looks like this: https://www.linkedin.com/in/stevendavismba/ In this profile "My passion" has a line break before it. How did he do that? AI: I have found the answer. When I click on my profile I get: This is the same as I've had before, but when I click on Show more it is suddenly formatted correctly: What I did was to create the SUMMARY line made very long with non-breaking space characters. My profile is:- SUMMARY Recent work: retailing systems, especially point-of-sale software for tills. Previous work: communications systems and real-time control. Specialities: Design and coding of and retailing real-time control systems. Languages: C++, C, PL/1, Fortran, Algol. Operating systems: Windows, Linux, Unix, proprietary. The profile you quote in your link works because the first paragraph is longer that the space available in the Show less box, so you don't see any of the formatting failures. So you have two answers, or rather work-rounds:- Use a long heading, as I have done. Write a long initial paragraph.
H: What browsers does Shopify support? On an older MacBook, cannot even install Firefox and the version of Chrome which does install does not allow full functionality for Shopify. Perhaps an alternative browser would allow login and management for Shopify accounts? AI: Shopify requires an up-to-date web browser to make sure that you can use all of Shopify's admin features. Shopify currently supports the latest two versions of all browsers, unless otherwise noted. Browsers supported by Shopify include: Google Chrome Mozilla Firefox Apple Safari Microsoft Edge Opera Apple Safari for iOS Google Chrome for Android https://help.shopify.com/manual/intro-to-shopify/shopify-admin/supported-browsers
H: How to check whether a range of cells is a subset of another range? My Problem I have a few lists on a Google Sheet, each kept in a column of cells. One of the list is the Master list, and I would like to make sure that the elements in the other lists are also present in master. For example, list1 and list2 are valid, but list3 is invalid because x is not present in master. Duplication is orthogonal to the question - I can use UNIQUE if I'd like to check for uniqueness as well. What Have I Tried LOOKUP only works for a single value and for sorted ranges Using Google Sheets Query Language: Did not find any set / list operations My Question How can I check whether all the values in an unsorted cell range exist in another cell range? AI: LOOKUP only works for a single value Not true. =ARRAYFORMULA(AND(MATCH(I2:I4,H2:H5,0))) MATCH to lookup the row of I2:I4 in the MasterList AND to combine all matches and throw N/A,If any of the values are not found. ARRAYFORMULA to use arrays in formulas.
H: Conditional formatting based on dependent variable cells Apologies if the title is unclear -- if anyone can suggest better wording I will change it. I wasn't sure how to condense this question into a single sentence. I have a spreadsheet with three columns and I need it to be sortable by all three, however, some of the values in column A have multiple values tied to them in column C, and therefore have multiple entries, but the different entries cannot have different values tied to them in column B. I need the row to indicate an error (in the form of a different color) if whatever value is in column A appears elsewhere with a different associated value in column B. For example: Mike 7 Green Mike 7 Blue Patrick 7 Green Sarah 12 Purple Sarah 11 Green In this list I would like both of Sarah's rows to be highlighted in red, regardless of whether or not they are currently next to each other(I can make it work if they're next to each other). I don't know of a way of actually locating a duplicate cell, only checking if one exists with COUNTIF(), so I'm not sure how to then reference the cell next to it. Is this possible? AI: I slept on it, and the solution miraculously came to me! Here's how I've gotten it working, in case anyone else is attempting something similar. First off I am counting the number of times a value appears in Column A (the names column, in my example). COUNTIF($A$1:$B,$A1) This will return a value of 1 for Patrick and a value of 2 for both Mike and Sarah. I am using a FILTER() function to create a searchable range which only includes rows which have the same Column A value as the row I'm currently formatting. FILTER($A$1:$B,EQ($A$1:$A,$A1)) I am then using this as the range for a second COUNTIF() function, which will count how many times the value in Column B appears. COUNTIF(FILTER($A$1:$B,EQ($A$1:$A,$A1)),$B1) This will return a 1 for Patrick and a 2 for both of Mike's rows, the same as the value from the previous COUNTIF(). However, both of Sarah's rows will return a 1, since "12" and "11" both appear only once beside her name. If all appearances of the Column A value have the same Column B value, then these numbers should match. If there are multiple unique Column B values, the second number will be smaller. So all that remains is to compare the two and return TRUE if my first number is greater than the second. Full formula: =COUNTIF($A$1:$B,$A1)>COUNTIF(FILTER($A$1:$B,EQ($A$1:$A,$A1)),$B1) This will return FALSE for Patrick and Mike, but TRUE for Sarah's rows, correctly flagging them as containing an error.
H: Google Sheets Arrayformula with exceptions? I am using fantastic Arrayformula to populate a grid in a Google Sheet: The following is being used in each column: =arrayformula(if(Z2:Z <> "","■","")) Now there are some cases where the marking "square" could be inserted manually, however this will break the Arrayformula as it cannot overwrite. How could I achieve this? AI: Replace the formula by its results by using copy & "paste as values". Select the area of the fantastic ArrayFormula results. Click on Edit > Copy Click on Edit > Paste special > Paste values only Now you could add edit the any cell in the range without losing the values originally retrieved by the fantastic ArrayFormula. Related Q&A Allow data from IMPORTRANGE to be overwritten
H: Google Sheets data validation dropdown will not show if cell contains formula I have a data validation dropdown with a list of possible values, and if the cell is empty or has a value, the dropdown list will show correctly. But if the cell contains a formula, the dropdown list will not show and clicking on the dropdown arrow will enter cell editing. Is this by design? AI: pretty much yes, to return on selectable items on dropdown menu you need to select a cell and delete it with Delete to avoid it use green aproach:
H: How to sum all the value based on single key after equal symbol within single cell in Google Spreadsheet as mention on the title, I am able to sum based on single key after equal symbol all the value within the single cell as shown below. Thanks to @Emmabee, I was able to get the total of that specific key. =arrayformula(sum(if(iferror(find(concat(B1,"="),transpose(split($A2,", "))), 0)=1,filter(split(transpose(split($A2,", ")),"="),{FALSE,TRUE}),0))) AI: =arrayformula(sum(if(iferror(find(concat(B1,"="),transpose(split($A2,", "))), 0)=1,filter(split(transpose(split($A2,", ")),"="),{FALSE,TRUE}),0))) This formula assumes the data to be summed is in cell A2, and that the "key" is stored in cell B1. Explanation: To display this messy formula more clearly: =arrayformula( sum( if( iferror( find(concat(B1,"="), transpose(split($A2,", "))), 0)=1, filter( split( transpose(split($A2,", ")),"="), {FALSE,TRUE} ), 0 ) ) ) What each function is doing in this formula specifically: ARRAYFORMULA() This is here to allow arrays to be used and returned in non-array functions, specifically IF() and SPLIT(). This is how we're able to recursively handle each cell in the range one at a time without the luxury of helper cells to split the keys from their values. SUM() Most of this formula is carefully creating an array whose only elements are the values which follow the key. The SUM() function is the nice simple ending, taking that curated array as its range and summing all the values. IF() Since we don't have actual cells to work with, we need to use the IF() function. With the help of ARRAYFORMULA() we are able to make this work essentially like a for-loop in programming would. It loops over an array of variables, checking each one against the specified condition and then returning the specified value. In our case, checking to see if the text before the "=" is our key, and returning the text after the "=" if it is. FIND() This function allows us to check each cell to make sure the key is present. The function will return the location where the specified string was found. If the string was the first thing written in the cell the returned value will be 1, and since that's all we care about here, that's all we're going to check. (Without this check searching for the key "6a" would also find any data tied to key "26a" or "9375486a".) IFERROR() If the FIND() function can't find the specified string at all, instead of returning a numerical value it will return an error. The error throws a wrench in our plans since the rest of the formula won't accept it, causing us to get an error message any time at least one cell in the range does not contain the specified key. So.. literally 100% of the time. We're using this function to replace the error with a 0, though as long as we don't replace it with a 1 it doesn't matter what number we pick. CONCAT(B1,"=") This is the other half of protecting the data from similar keys. Appending the equals symbol to the end of the key before we search for it ensures that it's the last thing written before we get the value the key is tied to. (Without this check searching for the key "6a" would also find data tied to key "6aa" or "6ab". These precautions also protect our data from purely numeric keys which may also appear as values. Otherwise searching for the key "12" would also find something such as "26a=12" even though the 12 here is not a key.) Together these last three functions return a value of TRUE whenever the key we've been given and the key in the cell we're looking at are exactly identical, and FALSE otherwise, which gives us the first parameter in our IF() function. SPLIT() The SPLIT() function is the other one being given special functionality by the ARRAYFORMULA() function. In our formula it's doing two things. First it's splitting the data in the single cell into a single row with each key/number pair as a separate entry. The other thing it does is accept this split data TRANSPOSED() into a column instead of a row and returning a matrix with two columns. The first column will contain the key, and the second will contain the data after the equals sign. FILTER() Since the second use of the SPLIT() function is only being performed on cells which return a value of TRUE in our IF() function, we already know that each item in the first column will be our chosen key. The examples you gave all have the key as a string, meaning we could just leave them and let the SUM() function at the end ignore them. However, I wanted to make sure this formula would still work for you if you found the need to use purely numeric keys. We use FILTER([range], {FALSE,TRUE}) to drop the first column and only keep the values in the second column. Otherwise the numeric value of the key would be added to the result for each time it appeared. Then finally we add ", 0" before we close the parentheses on our IF() function, so that cells without the key will contribute a 0 to the final sum instead of FALSE. Why? I don't know, it doesn't really matter, but it's only three extra characters and I think it's good manners to only give numbers to a SUM() function. Close up the rest of the parentheses, and we're done!
H: Truncate Text returned from indexhtml I'm new to making spreadsheets. I'm making one for a game I play. I'm trying to use an api call to return json data from the games exchange website, to update prices in near real time. However I don't know how to format the returned value for my function into an int to manipulate the number later in other cells. EDIT Cell formula below. =Index(ImportHtml(CONCAT("http://services.runescape.com/m=itemdb_oldschool/results.ws?query=", encode(B8)), "table", 1),O9,3)*1 EDIT Error Function MULTIPLY parameter 1 expects number values. But '37.8k' is a text and cannot be coerced to a number. As you can see, the game I play runescape. has non standard increments for 10k 100k 1m 2b. And I want to be able to somehow depending upon what is returned to me(k, m, b) multiply the number respectively to match the price. I'm not sure where to start looking for ways to do this? AI: =iferror(value(A1), if(right(A1)="k", left(A1, len(A1)-1)*1000, if(right(A1)="m", left(A1, len(A1)-1)*1000000, if(right(A1)="b", left(A1, len(A1)-1)*1000000000, "Unexpected Value")))) This will check the contents of A1 and return the numeric value associated with it. First it will check if trying to turn A1 into a numeric value using in-house methods will produce an error. If not it will simply return that result. This handles all numbers less than 1000. Next it will check if the right-most character is a k. If it is, it will remove that character and multiply the remaining string by 1000. If the character was not a k it will check if it's an m. If it is, it will remove that character and multiply the remaining string by 1000000. If the character was not an m it will check if it's a b, similarly removing and multiplying the number (this time by 1000000000) if it is. Finally, if the value was not already a number and did not end with a k, m, or b, it will display the string "Unexpected Value" to alert you to the problem.
H: Can't upload deck on Anki with "malformed deck package" error I'm struggling with uploading my own deck to Anki. I found that when I tried uploading my deck on this page, it always got me the error "Malformed deck package". So I tried downloading styled_impord from their official site, and open it, then compress it again with the following command, but got the same error. zip -r -X new_import.zip styled_import What made the error happening? Is this a bug? Or maybe am I wrong with compressing the deck? AI: I finally found out that zip command on macOS does not work in other platforms, and Anki must not use mac on its server. So instead of zip, use ditto command as written in this answer: ditto -ck --norsrc directory directory.zip And the import finally succeeded.
H: How to auto-sync all Telegram supergroup users to a channel? Can I automatically add all users that join a supergroup into a channel? AI: I don't think there's an existing way of doing that, but maybe it can be achieved via the API. Note: I heard of people that added multiple users to channels and then got banned/restricted in some way or another. I don't know (and couldn't find out) what are the limitations before it would happen. I think that the most probable way is to use the Telegram API to achieve that, maybe by creating a little script/app that will read the users from your group and add them to the channel. Have a look at the messages.addChatUser method. A question on StackOverflow that asks how to do it with a bot: Add user to channel automatically when user asks If you don't want to risk anything (such as being restricted), I would go by engaging users to join by themselves: Create a nice post with an image an a button to the new related channel. Forward messages from the channel to the group. Pin an invitation message to the chat (assuming you're the admin). Note that if you're not the admin, they will probably won't be happy with your advertising..