Google sheets, block data entry if… - google-sheets

I have a simple google sheet, with Date, Client ID, Name, etc.
What I would like to do is block any kind of data entry IF the first letter of the Name is NOT UPPERCASE.
I know this might sound a bit silly, but the person entering data just won’t do as I ask, and enters Name's inconsistently. So I want it to be blocked and force him to go back, correct the first letter uppercase, and the be able to enter data.
Another option could be a pop up message that warns that the name has been entered incorrectly? Anything like that.
Thanks.

Create data validation rule for column with formula:
=EXACT(LEFT(A:A,1),UPPER(LEFT(A:A,1)))
change A:A to column reference with names

Related

GoogleSheets - bringing back last "n" characters that are uppercase only

I have data that brings back a name plus the ticker code. I need to extract the ticker code only into google sheets.
using: =IMPORTXML("https://www.coingecko.com/?page=5","//tr") I bring back 100 coins but the first column is for example
Dogecoin9DOGE
or
Ethereum2ETH
or
Ethereum ClassicETC
I would like to create a column that simply has DOGE or ETH or ETC, anyone know of a way to manipulate the 1st column to get to that?
Thanks
the webpage looks like it is 2 separate columns but the extract does not work that way. I was trying to think of a way to count the uppercase values and then maybe use a RIGHT(len(uppercasevalues)) but not sure how to get there.
You can use REGEXEXTRACT.
=REGEXEXTRACT(A1,"[A-Z]+$")

Make a COUNT list

Good morning,
I have a dynamic list of all used words in a certain file.
When I type something D2, it scrapes new data.
This new data then gets =unique in F75:AH100.
This data then gets listed in Sheet B.
Next step would be to put a count of all the unique data in Sheet B. This so we can see the importance of a certain string with multiple scraped data points.
Can this be done with a formula or should I use a script?
Example file: https://docs.google.com/spreadsheets/d/14ewg-2oJHe1GWaeY_zoRvaxKSWYDnPkiyOlTE_C504w/edit#gid=0
If there is anything unclear, please let me know and I will update this topic as soon as possible!
I know the formula used for Sheet B is dynamic and will change when new data is entered in A. I already have a script for that.
Thinking logically it should be something in the line of
"If cell is counted, then take that value as minimum, and then go on with normal count"
try:
=INDEX(COUNTIFS(B3:B; B3:B; ROW(B3:B); "<="&ROW(B3:B)))

How to make google form responses submit to bottom of spreadsheet and not ignore manually entered data in the spreadsheet

I have a spreadsheet with responses from a form, but occasionally we manually enter responses into the spreadsheet that do not come in through the google form. I would like these to remain in order with the form responses, but when a google form is submitted it inserts the next form response after the last form response and shifts the manually entered data on the spreadsheet down.
Is there a way I can get the manually entered data to be recognized when the form submits and always append the latest form response to the bottom of the spreadsheet?
I followed this answer here but it doesnt work for me, it still ignores manual entries. Any help is appreciated.
You cannot have automated data and manually entered data in the same range.
For instance, if you use an array formula on a sheet in in B:B, the array formula "owns" B:B. If you then enter manual data anywhere in B:B, you will "break" the array, all of your formula data will disappear and the original formula cell will show an error. Think of that error as Google Sheets' way of saying, "Looks like you decided that you want to use this range for manual data now instead of formula-produced data, so it appears your formula is now not what you want."
The same concept is true for form integration. A form does not "read" cell from your Google Sheet. It just outputs data to it. It's a one-way conversation, so to speak. As such, the form doesn't know what else you are doing on the form-data intake sheet. It only knows how to find the information that marks where it left off with the last submission; and then its instructions are to enter a new line below that point for the next new submission.
In other words, a form "owns" the sheet you integrate it with. And the form will do what it is programmed to do, regardless of whether you try to also "own" that sheet by typing into in manually.
The simple solution: always use your form to enter data.
If you say to yourself, "But using the form is more work than manual entry," it's time to rethink your form and your user experience, since forms are meant to make data entry easier than manual entry into the spreadsheet, not harder.
This sounds plain, but i keyed in the timestamps columns of manually entered data to any earlier date and sorted the data by timestamp. the new data from the form would populate the bottom rows after
however new responses doesn't take your formats n formulas..maybe u have to export it for calculations etc
hope this helps

ARRAYFORMULA with IMPORTRANGE

In column B are listed IDs of Google Sheets. In column C are listed cells, from which I want to import data.
Screenshot of the table
In column D is shown the result of using IMPORTRANGE() by simply dragging it. e.g. for D1 it looks like:
=IMPORTRANGE(B1;C1)
for D2:
=IMPORTRANGE(B2;C2)
and so on.
In column E I want to display the same result but using ARRAYFORMULA that looks like:
=ARRAYFORMULA(IMPORTRANGE(B2:B4,C2:C4))
but the function displays only the data from the first spreadsheet.
People complain about this permissions issue a lot, but it's not hard to solve. What I do is have a sheet which I name "Splash sheet" into which I paste the URLs of the documents I wish to link. To its right is a column headed "permit to connect" which contains IMPORTRANGE formulas importing a single cell from each sheet -- usually a cell containing a confirmation code, number or document name -- on a sheet also named "Splash Sheet." For example,
=IF(B3="enter URL",,CONCATENATE(IMPORTRANGE(B3,"Splash sheet!A1")," ",IMPORTRANGE(B3,"Splash sheet!B1")))
So, when you first connect a spreadsheet via its URL, you get those messages telling you you need to connect, you click the Permit Access, the confirmation code/number/document name appears in the second column, and voilá, your sheets are connected forevermore! Now all your other IMPORTRANGEs referencing that URL will work, and you can use IMPORTRANGE formulas that reference the URL-containing cells on the "splash sheet."
As for the OP's original question, I came here seeking an answer to the same problem, and after more research have realized that we are attempting the impossible here. No way to do this an ARRAYFORMULA. No way around writing formulas that reference every single cell a document's URL may go into.
Problem is you can't make arrays of arrays in spreadsheets; that would involve multiple dimensions, and the medium is inherently two-dimensional. This is what people use databases for.
ARRAYFORMULA doesn't work when importing data (I think it relates to permissions). You could use something like this, =IFERROR(IMPORTRANGE(B5:B7;C5:C7)) and pre-fill the column first, but still there would be the permissions issue. Each new imported sheet needs it's permissions granted by a user.
TLDR: If I understand your intention correctly when you say you would like to see
=ARRAYFORMULA(IMPORTRANGE(B2:B4,C2:C4)), I believe you can make that
happen using the following.
=ARRAYFORMULA(IMPORTRANGE(
INDIRECT(ADDRESS(ROW(B2:B4), COLUMN(B2:B4)),
INDIRECT(ADDRESS(ROW(C2:C4), COLUMN(C2:C4))
)
Breakdown
Use IMPORTRANGE with INDIRECT to create ranges inside ARRAYFORMULA
Call INDIRECT with the ADDRESS function
Call ADDRESS with the ROW and COLUMN functions since they take ranges via ARRAYFORMULA
using IMPORTRANGE with INDIRECT
IMPORTRANGE's two parameters are the spreadsheet url stored in B2:B4 for this example and the range (e.g. sheet!A1:B2) stored in C2:C4.
Since IMPORTRANGE doesn't take a range reference directly as you mentioned, you'll need to build it for each row with ARRAYFORMULA using the INDIRECT function.
INDIRECT can be used to compose a cell reference using A1 notation, for instance
=IMPORTRANGE(INDIRECT("B" & 2), INDIRECT("C" & 2))
will produce the same result as
=IMPORTRANGE(B2, C2)
Since this produces the same result, we now just have to find a way to make INDIRECT work with ARRAYFORMULA
Use ADDRESS to build the parameters for INDIRECT
Next you want to use ADDRESS to build the A1 reference for INDIRECT. For the current purposes, ADDRESS takes a numerical value for row and column as parameters
=INDIRECT(ADDRESS(2,2))
will produce the same result as
=INDIRECT("B" & 2)
Since these two are interchangeable, now we just need to find a way to get the numerical row and column values out of ARRAYFORMULA.
Call ADDRESS using the ROW and COLUMN functions
From there, you can get the row and column indexes from standard A1 notation using the ROW and COLUMN functions. While this may seem like we're pointlessly going in circles, the difference now is that ROW and COLUMN perform as expected with the ranges provided by ARRAYFORMULA. So given that ADDRESS will return $B$2 using using either method below
=ADDRESS(2,2)
or
=ADDRESS(ROW(B2),COLUMN(B2))
we now know that
=ARRAYFORMULA(ADDRESS(ROW(B2:B4),COLUMN(B2:B4)))
will produce the following array of addresses
{ $B$2; $B$3; $B$4 }
Final Assembly
So when we put this all together, we get
=ARRAYFORMULA(IMPORTRANGE(
INDIRECT(ADDRESS(ROW(B2:B4), COLUMN(B2:B4)),
INDIRECT(ADDRESS(ROW(C2:C4), COLUMN(C2:C4))
)
where INDIRECT(ADDRESS(ROW(B2:B4), COLUMN(B2:B4)) is more or less interchangeable with what you might expect from B2:B4 inside ARRAYFORMULA and represents the url parameter
and INDIRECT(ADDRESS(ROW(C2:C4), COLUMN(C2:C4)) is roughly interchangeable with what you might expect from C2:C4 inside ARRAYFORMULA and represents the range parameter.
Suggestions on organization
I recommend using the indentation (Alt +Enter to create a new line ) above along with your indentation of choice to keep it easier to read. In the end it's just a bit more syntactic sugar and if spaces are used well it shouldn't be much harder to understand and make changes to 6 months later.
RE: Permissions - as mentioned by Atiq Zabinski, just placing a simple
IMPORTRANGE("http:/xxxx", "A1") somewhere on the sheet will provide a
means to know if the sheet is connected or not and the error message
should give you a context menu for connecting the sheet. You'll might
want to stay away from error handling in these scenarios as it will
slow down the process of connecting the sheets.

Text replacement

I have a small business that uses Google Sheets to track our employee's cases. When they are typing in that they are handling a case they just put their initials. I would like to make use of the Reminders addon to make sure that cases are not forgotten. The Reminders addon requires that an email be given with who to contact so that it can send them an email reminder. However it is faster to simply type the initials of the case worker.
How to manipulate the functions or write a custom one so that all initials in a certain column can be replaced with the corresponding email?
For example:
=IF(B2="ABC", SUBSTITUTE(B2,"ABC","ABC#123.com"))
Will place ABC's email if the initials ABC are found in a new cell. However I can't expand the function to replace all the employees initials in one script as IFELSE is not recognized as a valid function.
You could do this with a simple vlookup
Make a new sheet with two columns. The first containing the initals the second containing the email addresses.
In a new column in sheet1 you would then write somethign like this:
=vlookup(B2,Sheet2!A1:B25,2)
Where B2 is the cell with the initials and Sheet2!A1:B25 is the range where you store the email addresses.

Resources