How do I prevent GoogleFinance from rounding stock prices? - google-sheets

I am trying to make a stock portfolio in Google Sheets to track my stonks. However, I have some penny stocks that are less than 1 penny, and GoogleFinance rounds them down to 0, making it impossible to calculate % of the portfolio. The code I use is:
=GOOGLEFINANCE(B2)
and neither adding the ROUND function or changing how numbers are displayed in excel are working. Is there a fix or do I have to scrape from elsewhere?

try:
=TEXT(GOOGLEFINANCE(B2); "#.00")*1

I found the answer in this reddit thread:
https://www.reddit.com/r/pennystocks/comments/lc4fg1/using_importxml_to_input_live_penny_stock_quotes/
You have to use importxml function and make sure the google sheets cell is set to show at least 4 decimal places.

Related

google sheets: extract all decimals from a single row and find the average

I have a google sheet( link: https://docs.google.com/spreadsheets/d/1eilz0uOhAnXkc7dpvSktcXv1-S7BWRGw3MZj9kOZGoI/edit?usp=sharing) I need help with. I want to be able to put the average of the scores for topic 1 (eventually I will add more topics but am keeping it simple for the question) in B3. I need to be able to only take the decimal values of scores and count how many instances to get the average. I am new to google sheets. Any hints would be appreciated, thanks.
I have tried to use the average function but it seems to work for columns and doesn't account for only calculating based on integers.
Use average(filter()), like this:
=iferror( average( filter(C2:K2, C$1:K$1 = "scores") ) )

Google sheets function

Good afternoon I have a simple issue I hope to fix in google sheets.
I am trying to create a formula in google sheets however I am not fully adept with the software.
The formula I am trying to create is the following:
Unit price (The unit price always changes) - .20 cents * Qty (gallons in fuel). In order to get the total the one thing that is causing the issue is the fact that the unit price is always changing and therefore every time we need to manually enter the number. However, that is not the hard part.
What I want to have set up is the formula for what comes after we set the unit price manually that the system automatically does the math.
Using the little information you share (and taking a wild guess), I would say you can try the following
In cell D2 place
=ArrayFormula(IF(LEN(A2:A),(A2:A-$B$2)*C2:C,""))
To find the total of all prices use this in cell E2
=SUM(ArrayFormula(IF(LEN(A2:A),(A2:A-$B$2)*C2:C,"")))
(Please adjust ranges to your needs)
Functions used:
ArrayFormula
IF
LEN
try:
=A2-B2*C2
or maybe:
=(A2-B2)*C2

Google Sheets: Statement to convert emoji's/text into a percentage and add it up at the end

I'm trying to make a google sheet that takes in information from a google form and then converts those answers into a Percentage to be added up at the end.
So for example the form has a section where people can either pick a thumbs up or thumbs down emoji for an answer and it will add that emoji to the sheet. Is there a way to say something like
IF((A2 = 👍) Percent = 15%), ELSE(Percent = 0%) to indicate either a thumbs up or down % score.
I'm not too familiar with google sheet syntax just yet and nothing I've looked for has worked so far, would appreciate any help!
You can use the following formula:
=SUM(ArrayFormula(IF(H2:H="👍",ARRAYFORMULA(SUBSTITUTE(H2:H,"👍",1)*15%))))
(Please adjust ranges to your needs and format the results as percentage)
Functions used:
ArrayFormula
IF
SUBSTITUTE
SUM

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: Add value to total if a row condition matches for infinite column

I am attempting to make a Google Sheet that has a column for a rate and a value of that rate. Each night I am adding a new value to the bottom of this list so I want it to continue as an infinite list. What this sheet should do is look down the list of rates, if the rate matches a predefined rate, it should add the corresponding value to the total for that rate. I have four common rates that occur in no particular order and with some given value. I would like to total the values for each of those rates and give them in the totals section so each rate can be easily referenced.
Is there a way to do this using Google Sheets built-in commands? Pseudocode would be something like IF(A2:A = rate, add value in B to total). I know to make an infinite reading of a column by A2:A, but I don't know how to check each value as it goes through that column. I have attached a test spreadsheet with some sample values and the output that should be given by the formula. Thank you in advance for your help.
https://docs.google.com/spreadsheets/d/19k1DMipSsI9tWSjTXrVAPzPoaenWS6WYmlwe201_WQk/edit?usp=sharing
I managed to discover my own answer using the SUMIF statement. My code for the rate of .75 is ""=SUMIF(A2:A,"=.75",B2:B)"". I ran into some more trouble with the section for a different rate because I was having trouble saying not equal to .75 or 1 or 1.5 or 1.75. I solved this problem by completely bypassing it and adding the all the values and subtracting away the values already added. I would still like to know how to give the list of "ors" if someone could shed some light on this. But I now have a working solution regardless. I have updated the test sheet to show the solution.

Resources