So I am trying to create a sheet to help our HR Department create the emails for new hires. One of the issues is we use a format of First Initial Last Name as our naming scheme, but if you don't check it can double up with common last names. HR usually does not check for previous emails that currently exist.
Basic recreation I am trying to do is this:
Username: IFS(F2<>"", F2, IF(COUNTIF(A:A, D) > 1, E2, D2)
First Choice: LEFT(B2, 1) & B3
Second Choice: B2 & B3
What I want for A2:
So basically if Override is set, i want it to use that. If no override is set, i want to check and see if First Choice is already found in column A, if it is already used then use Second Choice. I keep getting a circular dependency. I even tried having the calculation done in Column G, which works. But once I try and set A2 to G2, it gives the circular dependency error again.
you can outsmart it...
paste in A2 cell:
=ARRAYFORMULA(IF(F2:F<>"", F2:F,
IF(COUNTIFS(IF(F2:F<>"", F2:F, D2:D),
IF(F2:F<>"", F2:F, D2:D), ROW(A2:A), "<="&ROW(A2:A))=1,
IF(F2:F<>"", F2:F, D2:D), E2:E)))
paste in D2 cell:
=ARRAYFORMULA(LOWER(LEFT(B2:B, 1)&C2:C))
paste in E2 cell:
=ARRAYFORMULA(LOWER(B2:B&C2:C))
If you are getting a circular dependency you may just need to change the calculation settings.
Go to File > Spreadsheet Settings > Calculation and switch Iterative Calculation on
Let me know if this doesn't work!
Related
I am trying to make a simple logic on google sheets but there is some error. I want to 3 check boxes and when they are marked current time is saved.
so far i am using these three statements
=if($B$2=TRUE(),NOW(),0)
=if($B$3=TRUE(),NOW(),0)
=if($B$4=TRUE(),NOW(),0)
b2, b3 and b4 are cells addresses for check boxes. The problem i am facing is when i check B2 it gives me the current time. But when i check B3 it gives me current time and also changes the time of B2 similarly when i check b3 it changes the time for all three to the current time.
Why is this happening and what could be the probable solution.
Thankyou in advance
You cannot get a permanent timestamp with a spreadsheet formula, even with a named function or an Apps Script custom function, because formula results refreshed from time to time. When the formula gets recalculated, the original timestamp is lost.
The easiest way to insert the current date in a cell is to press Control + ; or ⌘;. See the keyboard shortcuts help page.
You can also use an onEdit(e) script to create permanent timestamps. Search this forum for [google-apps-script] timestamp to find many examples.
Currently, I have Data Validation for cell E4, stating formula =IF(E4>1,””,1). This prohibits the user from entering any number other than 1 or zero.
I need the user to manually enter the number “1” in cell E4 if a particular action is accomplished (a numerical checkbox, essentially).
I also want the value of cell E4 to read “1” if cell B4 reads the number “3”.
I’ve read several examples of nested IF statements and can’t find any that reference two different cells to decide the value of another cell.
Can I make nested IF statements in Data Validation? I haven’t been successful in doing so.
The two formulas I need to affect cell E4 are;
IF(E4>1,””,1)
and
IF(B4=3,E4=1,””)
Any help is much appreciated.
You just need an OR statement.
=IF(OR(E4 > 1, B4 = 3),””,1)
I have prepared the following google sheet:
https://docs.google.com/spreadsheets/d/1OU_aLgaIdDD2-pBNSV0y1d5B-YDAZeKbWb1PVtdkGZA/edit?usp=sharing
In cell B3, I want to show the contents of B1, after having removed any value that is displayed in B4. (to make it easier, I included a list of the actual values in B6+). If it's easier, you can use the range B6:B as values to exclude from B1.
I thought about using a nested substitution, however, the list will likely expand over time, so I'm trying to make it more scalable now.
I also looked at https://infoinspired.com/google-docs/spreadsheet/replace-multiple-comma-separated-values-in-google-sheets/ but I couldn't make the bottom formula work.
Because of the nature of this project, it needs to be a formula that I can drag and drop onto more cells (C3:GQ3)
paste in B3 and drag to the right:
=TEXTJOIN(",", 1, SPLIT(REGEXREPLACE(B$1, SUBSTITUTE(B4, ",", "|"), ), ","))
I am trying to find the lowest value of cell B1 that is constantly being updated.
If B1 is lower than A1, then A1 will be replaced with a new B1 value.
And if B1 is higher than A1, then A1 retain its previous updated number.
I am not sure if this can be done with function, script, or if it's even possible to do.
I have this in Cell A1
"=if(A1<B1,B1,A1)"
It's giving me error and I am guessing it's because the "value_if_false" is pointing to the cell I put the IF statement in, thus creating an infinite loop.
Please try in A1:
=if(A1>B1,B1,A1)
and turn on iterative calculation (which I would not normally recommend). Max. of 1 should be adequate.
Imagine I got the following DB:
a //primary key
b
c
d
At such the following functional dependencies are valid:
a -> bcd
b -> cd
c -> bd
Wht should I do to pass it to the third normal form?
I tried to separate as follows:
a -> b //this b is the foreing key to the b of the other tables
b -> c
b -> d
Is it correct?
You are thinking about it the wrong way. You do not play around with the dependencies (unless this is some toy HW problem that specifically tells you to); you want to split the table up so that all tables are in 3NF. In your case, this would be (I think!!):
ab
bc
cd
Where the italicized letter represents a key. Now, an example of why you do not play with dependencies:
Say this database was of people and held their SS, BDate, and Name. You could then say that SS -> BDate, Name, since it is pretty much true that your SS number is unique to you. Now, when you play around with dependencies, you play around with what the data means. It's not really up to you to say that SS number can determine your name; it simply is. Saying SS -> BDate and eliminating the Name attribute is simply false.
Similarly, with your database, although ABCD don't mean anything, their dependencies are fixed and not to be changed. So, that was my super long way of saying: split the tables, don't touch the dependencies!! =)