Issue with Google Sheets IF formula - if-statement

I'm trying to create an attendance tracker and need help with a small tweak to a formula.
Right now I'm using the following formula:
=IF(sum(G13,H13)=0,"TBD",AVERAGE(G13,H13))
Assume there are two cells (Day 1, Day 2)
Certain numbers are entered into the cell depending on if present (1), late(0.5), or absent(0).
Right now the formula is set to put "TBD" if no data is entered into a cell. As soon as a number is entered it will average the two cells together and give a percentage in another cell. The issue I'm having is if someone is absent both days. In that case it will still give a "TBD" in the final cell and I can't figure out how to get it to only give TBD if the cells are empty. If a 0 is put into a cell I want it to average it likes it does for the others.

try:
=IF((G13<>"")*(H13<>""), AVERAGE(G13:H13), "TBD")

Related

Is there a function to multiply a cell and a value together if a checkbox is "TRUE"?

I'm a beginner in Google Sheets and Excel, I am trying to essentially have a cell be multiplied by 0.05 if I check the checkbox in it's given row.
In my attached photo, I want the "Price" column values be multiplied by "0.05" and give the result in the "ECF AMT" column if the checkbox in the "ECF?" column is TRUE. To give in an example, if I check marked the box for the first row I want it to multiply $260.00 by 0.05 and display the result in the ECF AMT column.
I've been messing around with different types of IF statements but I cannot seem to figure what I feel should be a basic formula. I've watched several YouTube videos and skimmed through some forum pages but cannot find a solution. Any help would be greatly appreciated!

If statement based on presence of duplicates

If the data in column A is found in multiple rows, look at the data in column C for those duplicate rows. Whichever is highest value in C, return the value from the respective row but column B. In my picture, I'm trying to populate the stuff in yellow automatically, ideally with formulas in excel. Any help is greatly appreciated.
enter image description here
My first attempt was this (a formula that you may copy on cell D2):
=INDEX($A$2:$C$9,MATCH(MAX(IF($A$2:$A$9=A2,$C$2:$C$9)),$C$2:$C$9,0),2)
This is what it does: the combo INDEX-MATCH does what VLOOKUP does, but it is more efficient than VLOOKUP. Basically it commands Excel to navigate the $A$2:$C$9 range and then find the following match:
Find the row with the MAX price for the same Item (this part: MAX(IF($A$2:$A$9=A2,$C$2:$C$9)));
Then return whatever value is on column B, at that row.
Albeit this formula seemed to work, I tried something out: what if, by some unfortunate coincidence, the MAX price for two items was the same?
This is what happens when CDE888 sells for 217
Thus, one can tell the formula above is wrong and needs a fix. This is the new formula:
INDEX($A$2:$C$9,MATCH(A2&MAX(IF($A$2:$A$9=A2,$C$2:$C$9)),$A$2:$A$9&$C$2:$C$9,0),2)
This time, the formula looks for a value that is composed of the Item code AND its highest price.
The rest works exactly as the first formula.
One last word: I wrote this formula on cell D2, then dragged the formula down.

Running Total By Date in Visualization

I'm trying to create a line chart visualization that shows a constantly increasing sum over time. I think this would be called a cumulative total or a running total, but most of the questions I've seen on here have been about showing a total at the bottom of a matrix, subtotals, etc. Instead, I just want to visualize the units from the previous date being added to the current date, and so on. Not sure if this would be a custom column in the dataset or if there is an existing function for this.
Any help is appreciated. Thanks!
Goto Quick Measures, in the "Calculation" dropdown, select "Totals - Running Total", pull in Base Value (what you want to aggregate) and Field (probably your calender) and here you are!

Skip blank cells until value added in Google Sheets

I've created a budget sheet that includes a running balance in column E.
The problem that I've run into is my formula =IF(C140="","",(SUM($E139,C140))) works down the line after E140 (first day of the month that I started to implement this) until there is a blank. At the blank, the formula breaks for me. Now because this is a projected running total, it's preferred to have the blank spaces to allow for the days of the month.
I've tried a couple different ways to get the isblank or lookup formulas to work but I realize this is beyond my excel and google sheets knowledge. Is there a way to get the formula to skip the blank cells down column E and just use the last value, ie $598.66 in E143 when you get to the next cell that has a value in it, ie E151?
Photo added for reference....
try:
=ARRAYFORMULA(IF(E2:E="",,MMULT(TRANSPOSE((ROW(E2:E)<=
TRANSPOSE(ROW(E2:E)))*E2:E), SIGN(E2:E)^0)))

How to sum entries that have same ID OpenOffice - Calc

I have a spreadsheet similar to the one in the screenshot.
From this I want to sum all the entries in Data 2 which have the same Data 1 ID and store it in another column. So something like this:
I am not able to figure out the formula which would do this. I figured out how to get a column with unique entries I just need to figure out how to get the sum of the values which have the same data 1 id.
Can someone point me in the right direction?
You can use SUMIF, e.g. if I'm reading your sheet right, =SUMIF(A$2:A$7, A11, B$2:B$7), and then copy down. This sums the values from B2-B7 whenever the corresponding value in A2-A7 matches A11.
You can find more on SUMIF here.
you may use subtotals function under the Data tab, although it gives you the answer in the row below all the cell matching your id; then you have to click the - and + buttons that appear on the left...you may see these in this picture of my data
this is a nice resource when you have non-English characters(á, ó, ß,...), spaces, dashes and points, so it becomes difficult to process with sql