Formula Trouble in Google Sheets - google-sheets

I have a raw export of data, categorized by rows, amount, and date.
I'm having difficulty finding/combining various spreadsheet formula's to get the the total expenditure in say "Jan'20 for category XX"
I have currently tried a combination of Sumif/Index/Match formulas with no luck. Some assistance would be greatly appreciated.
EDIT#1:
Link to the google sheet is here

You seem to have the correct numbers on your main page so the formulas which total for each month, and by each category, seem to be working properly. I noticed that your pivot table wasn't sorting correctly. this turned out to be because you had your date values in the Month column on the Export tab set as string values. I converted these to date values, equal to the last day of the given month. I did the same for the month headers on your Main tab.
Now the pivot table sorts by month correctly, since these are now numeric values.
See here for a sample sheet.
https://docs.google.com/spreadsheets/d/1pmTgKqFZmKiP0k0iKDWGQlWVyKJF5PfglhcwhRj49Y4/edit?usp=sharing
If there is still an issue you need help with, please let us know, with the details.

Related

Can you assist me? I have an attendance spreadsheet in google sheets that needs some formula tweaking

For starters here is a sample sheet I have created. https://docs.google.com/spreadsheets/d/1befqsGQvbPfn0XTGrygLOGcrUIMrICUagJVH0S-2rDw/edit?usp=sharing
My attendance sheet has dates in row 2 and Name and Role in column A and B. I have a formula at the bottom of each column that calculates the total present broken down by role. I also have a formula at the top that displays those totals based on whether or not date matches today. I am trying to eliminate the need for the formula at the bottom as I have to copy it whenever I add a new column. Ideally I want to calculate all of this without the need to update my formula every time I add more dates.
Any help would be so appreciated.
P.S. The formula in C28 isn't needed I was just playing with some ideas.

Extracting year with max value for calendar day Google Sheets

I have a sheet with daily readings of lake level and temperature. I want to extract the max level for each day of the year, along with the year that the reading occurred. If it occurred more than once on the same day of the year, I'd like the first occurrence. It's easy enough to get the max for each day, but I haven't been able to also extract the year. I'm sure there are other people much more versed in GSheets than me who can figure this out. I also expect it's not that difficult, but I've yet to be able to find something that works.
Here's the sheet:
https://docs.google.com/spreadsheets/d/1kC3L0oDpnnJlFFuB76mUXiz3vGcfT5_fC3YbkE9Xgsg
UPDATE:
The layout you needed was a little different than what I'd first thought.
This QUERY will generate the maximum and minimums per day for your data.
link to sample sheet
=ARRAYFORMULA(QUERY({1*(TEXT('raw data'!A2:A,"mmm d ")&2020),IF('raw data'!B2:C=0,,'raw data'!B2:C)},"select Col1,MAX(Col2),MIN(Col2),MAX(Col3),MIN(Col3) where Col1 is not null group by Col1 order by Col1 label Col1'Day'"))
Then this formula will use those days and values to do a VLOOKUP back into the Raw Data to show the first year on which that value occurred for that day.
=ARRAYFORMULA(VLOOKUP(N(C4:D)&TEXT(B4:B,"mmm d"),{'raw data'!B:B&TEXT('raw data'!A:A,"mmm d"),YEAR('raw data'!A:A)},2,0))
This spreadsheet will be available forever.

Sum by month in Google Sheet

I have question about one function that i require in Google Sheets. I have a schedule of visitors and another sheet that includes every statistic data. I need to make a table which will contain sum of number, but statistic must be by month. In my source sheet i have columns which include date and amount. All that I need it's function. I tried it with SUMIF and SUMIFS but it doesn't work. Does anyone know how can I cope with this trouble? Thanks
you should try
=SUM(FILTER(vistorscolumnA:A,monthcolumnB:B="month"))
A little hard to get you all the way there without seeing your format, but this should get you close.

Google Sheets Formula cannot get the date from another cell

I want to get the price of bitcoin on exact date.
The dates are written in Column A and they are updated regularly from a Google form
This is an example of the working formula, but the date in it is written manually (2017-01-31):
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",2017-01-31)))
But when I try to get the dates from Column A, mentioned with $C$2:$C - Google sheets do not understand it
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",$C$2:$C)))
Click here to check The spreadsheet
Thank you in advance!
"Doctor, it hurts when I do this."
In the example spreadsheet you are converting the dates into text for the column C, using the explicit TEXT() function. Then you are wondering why they no longer work as dates?
Stop converting to text.

Transpose columns into diagonals

I feel like I'm asking something that is not possible with formulas in GSheets, but I've been amazed by the things this forum has been able to answer so I'm giving it a shot. :)
I get a report each morning that show an occupancy percentage for X days out. It can be exported as a csv file and the percentages are in a column. I have made a spreadsheet where we manually put this column in as a diagonal so it reflects the occupancy of corresponding day. I have linked to a sample of this. I have put the March 31 data from 'data' in as I would like to see it displayed on 'sheet1'.
Any way to get the data from 'data' to automatically transpose or display on sheet 1? It would also need to move down a date row (sheet1) for each date column (data) that is filled.
I hope I am explaining this clearly. Let me know if I need to clarify.
Thanks!
https://docs.google.com/spreadsheets/d/1-PQ1GXRmsXrd7u9SHBT-gZkSYE6oLKkMttndmULEomY/edit?usp=sharing
You can put this into C2 and drag across that top row.:
=ARRAYFORMULA(IFERROR(Data!$B$2:$B$29/IF((COLUMN()-1=ROW(Data!$B$2:$B$29)),1,0),""))
If you insist on a single cell array formula then this works:
=ARRAYFORMULA( {IFERROR(Data!$B$2:$B$29/IF((2=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((3=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((4=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((5=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((6=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((7=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((8=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((9=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((10=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((11=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((12=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((13=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((14=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((15=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((16=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((17=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((18=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((19=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((20=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((21=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((22=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((23=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((24=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((25=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((26=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((27=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((28=ROW(Data!$B$2:$B$29)),1,0),""),IFERROR(Data!$B$2:$B$29/IF((29=ROW(Data!$B$2:$B$29)),1,0),"")})
You must delete all cells that in the range to be filled by the array formula for it to work (C2:AD29).

Resources