{"id":2630,"date":"2020-10-08T11:38:48","date_gmt":"2020-10-08T09:38:48","guid":{"rendered":"https:\/\/importsheet.com\/?p=2630"},"modified":"2025-12-17T23:38:29","modified_gmt":"2025-12-17T22:38:29","slug":"formula-do-googlefinance-planilhas-do-google","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-formulas\/googlefinance-formula-google-sheets\/","title":{"rendered":"Como usar a fun\u00e7\u00e3o GOOGLEFINANCE no Planilhas Google"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093281?hl=en\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">GOOGLEFINANCE function<\/span><\/a><span style=\"font-weight: 400;\"> allows you to import real-time financial and currency market data straight into Google Sheets. It also enables you to track current and historical data for various financial instruments, such as stocks and shares.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This function imports data from the <\/span><a href=\"https:\/\/www.google.com\/finance\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Google Finance<\/span><\/a><span style=\"font-weight: 400;\"> web application. This Google tool provides daily stock prices, financial markets news, and analysis of market trends. Google Finance can be accessed from the Google menu like all other Google applications. Alternatively, if you search for a stock on Google, the first result will show you information from Google Finance.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If analysts wanted to gather information on a stock, they would have to visit a financial website or database to access a range of information. After carrying out research, the next step was to compile all that relevant stock information into a spreadsheet for further analysis.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This involved the analyst copying the stock information from the website and pasting it into a spreadsheet. An alternative was to use customized scripts to scrape this information from the web. The first approach is cumbersome, unreliable, and definitely not recommended. And the second method is faster, but it also has drawbacks. Getting a coder to write a script is expensive, time consuming, and not very flexible.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A more reliable and economic alternative to both options is the GOOGLEFINANCE spreadsheet function. If you work with financial market data, this function can automate data retrieval to save you serious time.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;syntax&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Syntax<\/h2>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong><span>=GOOGLEFINANCE(ticker, [attribute], [start_date], [num_days|end_date], [interval])<\/span><\/strong><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>ticker<\/b><span style=\"font-weight: 400;\"> \u2013 This is an abbreviation used to identify publicly traded securities. It consists of a combination of letters and numbers (for example, \u201cAAPL\u201d represents Apple Inc. and \u201cMSFT\u201d stands for Microsoft Corporation). The ticker will tell the function which stock to provide information on. The exchange that the stock trades on can also be specified, which will help avoid discrepancies. For example, you could type \u201cNASDAQ:AAPL\u201d. Be sure to put quotation marks around the ticker.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>attribute<\/b><span style=\"font-weight: 400;\"> \u2013 This is an optional parameter that specifies the type of information GOOGLEFINANCE function should fetch. There are a number of different options to select from such as \u201cprice\u201d and \u201cearnings per share\u201d (the next section includes a full list). Like the ticker, the attribute input is processed as text, so you\u2019ll need to wrap it in quotation marks (\u201c\u201d). By default, Google Sheets will retrieve \u201cprice\u201c information if you leave this blank.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>start_date<\/b><span style=\"font-weight: 400;\"> \u2013 This is used to indicate the starting date when fetching historical data. This is an optional parameter, if left blank the function will provide information from today. If you specify the <\/span><b>start_date<\/b><span style=\"font-weight: 400;\"> but not the <\/span><b>num_days|end_date<\/b><span style=\"font-weight: 400;\"> parameter, then you\u2019ll only receive data for that day.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>num_days|end_date<\/b><span style=\"font-weight: 400;\"> \u2013 This optional parameter, along with the start_date, will indicate the time frame between which Google Sheets should fetch the stock information.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>interval<\/b><span> \u2013 This is an optional parameter that indicates the frequency. The two possible inputs are \u201cWEEKLY\u201d and \u201cDAILY\u201d.<\/span><\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;attributes&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>GOOGLEFINANCE Attributes<\/h3>\n<table>\n<tbody>\n<tr>\n<th style=\"width: 20%;\">Attribute<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>&#8220;price&#8221;<\/td>\n<td>Stock price. In real-time but with a delay of up to 20 minutes.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;priceopen&#8221;<\/td>\n<td>Opening price (price at market open).<\/td>\n<\/tr>\n<tr>\n<td>&#8220;high&#8221;<\/td>\n<td>High price of the current day.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;low&#8221;<\/td>\n<td>Low price of the current day.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;volume&#8221;<\/td>\n<td>The trading volume of the current day.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;marketcap&#8221;<\/td>\n<td>The market capitalization of the stock.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;tradetime&#8221;<\/td>\n<td>The time of the last trade of the stock.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;datadelay&#8221;<\/td>\n<td>The delay time for the real-time data.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;volumeavg&#8221;<\/td>\n<td>The average daily trading volume.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;pe&#8221;<\/td>\n<td>Price-to-earnings ratio<\/td>\n<\/tr>\n<tr>\n<td>&#8220;eps&#8221;<\/td>\n<td>Earnings per share<\/td>\n<\/tr>\n<tr>\n<td>&#8220;high52&#8221;<\/td>\n<td>The highest price in the last 52 weeks.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;low52&#8221;<\/td>\n<td>The lowest price in the last 52 weeks.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;change&#8221;<\/td>\n<td>The stock price change since the end of yesterday&#8217;s trading.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;beta&#8221;<\/td>\n<td>The beta value<\/td>\n<\/tr>\n<tr>\n<td>&#8220;changepct&#8221;<\/td>\n<td>The percentage change in price since the end of yesterday&#8217;s trading.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;closeyest&#8221;<\/td>\n<td>Yesterday&#8217;s closing price.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;shares&#8221;<\/td>\n<td>The number of shares outstanding.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;currency&#8221;<\/td>\n<td>The currency that the stock is priced in.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<table>\n<tbody>\n<tr>\n<th style=\"width: 20%;\">Historical attribute<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>&#8220;open&#8221;<\/td>\n<td>Price at market open.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;close&#8221;<\/td>\n<td>Price at market close.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;high&#8221;<\/td>\n<td>The high price during the specified time period.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;low&#8221;<\/td>\n<td>The low price during the specified time period.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;volume&#8221;<\/td>\n<td>The volume during the specified time period.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;all&#8221;<\/td>\n<td>Returns all of the above.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>For a complete list of all attributes including those for mutual fund data, head to <a href=\"https:\/\/support.google.com\/docs\/answer\/3093281?hl=en\" target=\"_blank\" rel=\"noopener\">Google\u2019s GOOGLEFINANCE support page<\/a>.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;how&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2><span style=\"font-weight: 400;\">How to use GOOGLEFINANCE<\/span><\/h2>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;stock&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>1. Obtain stock information<\/h4>\n<p><span style=\"font-weight: 400;\">Syntax: GOOGLEFINANCE(ticker, [attribute])<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the following examples, I have used \u201cAAPL\u201d (Apple Inc.) for the ticker.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Firstly, I visited the <\/span><a href=\"https:\/\/www.google.com\/finance\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Google Finance<\/span><\/a><span style=\"font-weight: 400;\"> website, and searched for \u201cAAPL\u201d. As a result, you can see all the current stock indicators for Apple Inc.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-1.png&#8221; alt=&#8221;googlefinance-stock-1&#8243; title_text=&#8221;Googlefinance example 1&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Here&#8217;s how that information looks in Google Sheets using the basic version of the function:\u00a0<strong>GOOGLEFINANCE(ticker, [attribute]).<\/strong><\/p>\n<p>The GOOGLEFINANCE function pulls the corresponding information into the spreadsheet:<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-2.png&#8221; alt=&#8221;googlefinance-ticker-plus-attribute-2&#8243; title_text=&#8221;Googlefinance example 2&#8243; _builder_version=&#8221;4.24.1&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In the example above, I have listed the different attributes I want to look at in <strong>column A<\/strong>. I then reference these attributes in the formula, which allows me to quickly go down the list without having to change the formula every time.<\/p>\n<p>Alternatively, I could also hardcode each attribute into the formula, for example by typing =GOOGLEFINANCE(\u201cAAPL\u201d,\u201dLow\u201d) to give me the low price of the day.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/googlefinance-example-3.png&#8221; alt=&#8221;googlefinance-function-3&#8243; title_text=&#8221;googlefinance example 3&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Note that I\u2019ve fixed the location of the ticker reference cell <strong>B1<\/strong> by putting the<strong> $<\/strong> sign in front of the <strong>B<\/strong> and the <strong>1<\/strong> (using the <strong>F4 key<\/strong> on your keyboard is a shortcut).<\/p>\n<p>By doing this, you can drag the formula down from cell D4 cell right down to D18, and the formula will keep this reference cell constant. I did not fix the location of the attribute cell, because I want this to change as I go down the list to get all the different attributes.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;day&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>2. Obtain historical stock information for a single day<\/h4>\n<p>Syntax: <strong>GOOGLEFINANCE(ticker, [attribute], [start_date])<\/strong><\/p>\n<p>As listed in the table previously, Google Sheets provides a handful of historic data attributes like \u201copen\u201d, \u201cclose\u201d, \u201chigh\u201d, \u201clow\u201d etc.<\/p>\n<p>While you could try them individually, I\u2019ll explore the \u201call\u201d attribute, which provides them all at once.<\/p>\n<p>This will give the following result for the corresponding<strong> start_date<\/strong>:<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-4.png&#8221; alt=&#8221;googlefinance-example-4&#8243; title_text=&#8221;Googlefinance example 4&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Notice that the output of this historical attribute is more than one cell.<\/p>\n<p>When calling up historical data, the formula will provide a <strong>Date<\/strong> column and an attribute column (in this case, because I used \u201call\u201d to call up multiple attributes and I got 5 different attribute columns):<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=GOOGLEFINANCE(&#8220;AAPL&#8221;,&#8221;all&#8221;,DATE(2017,2,27))[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><b>Please note:<\/b> When calling up historical data you might see a #REF! error. This occurs when the GOOGLEFINANCE function encounters cells that already contain data. Here, the function would have to overwrite this data when it outputs its information over multiple cells.<\/p>\n<p>To solve this error, just make sure there are enough empty cells below and beside the cell in which you\u2019re entering the GOOGLEFINANCE formula, so that it has room to output its results over multiple cells.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-5.png&#8221; alt=&#8221;googlefinance-ref-error-5&#8243; title_text=&#8221;Googlefinance example 5&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The fact that the GOOGLEFINANCE formula fills multiple cells when providing historical information is usually helpful because it adds clarity to the information provided.<\/p>\n<p>Sometimes, however, you may want the formula to only give you a single number.<\/p>\n<p>For example, you might want the highest price of a stock on a given day, without the formula outputting a matrix including the date and the price. In this case, you would combine the GOOGLEFINANCE formula with the INDEX formula:<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=INDEX(GOOGLEFINANCE(&#8220;AAPL&#8221;,&#8221;High&#8221;,date(2017,2,27)),2,2)[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-6.png&#8221; alt=&#8221;googlefinance-function-6&#8243; title_text=&#8221;Googlefinance example 6&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In this example, I have used the GOOGLEFINANCE formula to give me the highest price of Apple stock on February 27, 2017.<\/p>\n<p>In the above screenshot, you can see that the output of the formula is a 2&#215;2 matrix which gives the date and the high price.<\/p>\n<p>If you want the formula to only give you the high price, without the cells that indicate the date and the headers, you can use the INDEX function and specify that you only want the formula to provide the information in the second row of the second column of the matrix that the GOOGLEFINANCE formula provides.<\/p>\n<p>As you can see, I do this by adding INDEX to the start of the formula and then specifying cell 2,2 as the output I want.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-7.png&#8221; alt=&#8221;google-finance-7&#8243; title_text=&#8221;Googlefinance example 7&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;period&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>3. Obtaining historical stock information over a period of time<\/h4>\n<p>Syntax: <strong>GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date], [interval])<\/strong><\/p>\n<p>So far I\u2019ve tried fetching the information corresponding to a single day. Can you do so for a period of time? Yes, you certainly can. Here\u2019s an example.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-8.png&#8221; alt=&#8221;googlefinance-8&#8243; title_text=&#8221;Googlefinance example 8&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The formula I use to do this is:<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=GOOGLEFINANCE(\u201cAAPL&#8221;,&#8221;Price&#8221;,date(2016,6,1),date(2016,12,31),&#8221;Weekly&#8221;)[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>From here, it&#8217;s easy to create a chart of the weekly closing price using the charting function in Google Sheets.<\/p>\n<p>By using the GOOGLEFINANCE formula to call up different attributes over different time periods and intervals, you can create highly customizable data sets and charts that will help you analyze the stock data in many different ways.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-9.png&#8221; alt=&#8221;googlefinance-example-9&#8243; title_text=&#8221;Googlefinance example 9&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;ytd&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>4. Obtain YTD stock information<\/h4>\n<p>Another common need for users is to obtain the YTD (Year To Date) stock information. This allows you to see how the stock is performing from the beginning of the year until now. Unfortunately, the only attribute for YTD is <b>returnytd<\/b>, which can only be applied to mutual fund data. To find the YTD value for your real-time or historical data, we must find an alternative.<\/p>\n<p>Luckily, we can find the YTD of stock by combining two specific formulas in one. Use the following syntax as your reference. Simply substitute the ticker with your own.<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=(GOOGLEFINANCE(ticker,&#8221;price&#8221;)\/INDEX(GOOGLEFINANCE(ticker,&#8221;close&#8221;,&#8221;01\/01&#8243;, today()),2,2))-1[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Here I\u2019ve obtained the YTD price for Apple. My formula looks like this:<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=(GOOGLEFINANCE(&#8220;AAPL&#8221;,&#8221;price&#8221;)\/INDEX(GOOGLEFINANCE(&#8220;AAPL&#8221;,&#8221;close&#8221;,&#8221;01\/01&#8243;, today()),2,2))-1[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2022\/05\/GOOGLEFINANCEfunction-YTD.png&#8221; alt=&#8221;GOOGLEFINANCE function YTD&#8221; title_text=&#8221;GOOGLEFINANCE function YTD&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>As you can see, by copying and pasting the formula above and substituting the ticker with my chosen stock, I have successfully returned the YTD value.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;use&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>How to use the GOOGLEFINANCE function for Currency Conversion<\/h3>\n<p>Another helpful feature of the GOOGLEFINANCE function is the ability to get live currency conversion rates directly in your spreadsheets.<\/p>\n<p>This can easily be done by replacing the stock ticker with \u201cCurrency:currency1currency2\u201d, where currency1 and currency2 are the three-letter codes for the currencies you want to convert.<\/p>\n<p>For example, to find the conversion rate between U.S dollars and Canadian dollars, I do the following:<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=GOOGLEFINANCE(&#8220;CURRENCY:USDCAD&#8221;)[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/10\/Googlefinance-example-10.png&#8221; alt=&#8221;googlefinance-example-10&#8243; title_text=&#8221;Googlefinance example 10&#8243; _builder_version=&#8221;4.16&#8243; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">This is just an overview of what GOOGLEFINANCE can do in terms of currency conversion. <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/finance-processes\/how-to-use-google-sheets-for-currency-conversion\/\"><span style=\"font-weight: 400;\">Learn more ways to convert currencies with spreadsheets.<\/span><\/a><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;googlefinance&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Googlefinance and Wisesheets<\/h3>\n<p>Two downsides of the GOOGLEFINANCE function are the lack of historical stock financials and real-time data. As you have learned, GOOGLEFINANCE is amazing but it does also have its limitations. If you are serious about stock investing and you want to save hours manually copy-pasting stock data the best way to do it is to use GOOGLEFINANCE and <a href=\"https:\/\/www.wisesheets.io\/?via=sheetgo\" target=\"_blank\" rel=\"noopener\">Wisesheets<\/a> together.<\/p>\n<p>With Wisesheets you can get the company\u2019s financials including the income statement, balance sheet, cash flow, and key metrics for 14 different exchanges. It can bring a 20-year coverage quarterly or annually directly on your Excel or Google Sheets spreadsheet in one click.<\/p>\n<p>All you need to do is enter the ticker in the add-on:<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/11\/Group-1-25.png&#8221; alt=&#8221;Googlefinance and Wisesheets 1&#8243; title_text=&#8221;Group 1 (25)&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Another option to get the same information but filtered is by using the <b>=WISE()<\/b> function. All you need is the company ticker, parameter, and the period (year, quarter, or TTM).<\/p>\n<p>You could for example get Apple\u2019s revenue Q1 revenue for 2020 by using the function like this:<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=WISE(&#8220;AAPL&#8221;,&#8221;Revenue&#8221;,&#8221;2020&#8243;,&#8221;Q1&#8243;)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>When you use the GOOGLEFINANCE function and Wisesheets together, you can create dynamic stock analysis models and get all the financial data you need immediately.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/11\/Googlefinance-Wisesheets-2-1.png&#8221; alt=&#8221;Googlefinance and Wisesheets 2&#8243; title_text=&#8221;Googlefinance Wisesheets 2 1&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Get the add-on here: <a href=\"https:\/\/www.wisesheets.io\/?via=sheetgo\" target=\"_blank\" rel=\"noopener\">Wisesheets<\/a><\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;reporting&#8221; _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2><span style=\"font-weight: 400;\">Stock reporting in Google Sheets<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">If you work with stock market and currency data, GOOGLEFINANCE function is a huge time-saver when working in Google Sheets. Experiment with the different attributes and find out what works for you!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Need to collate financial data from multiple Google Sheets into a central file for reporting or analysis? Discover how to merge <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/combine-google-sheets\/\"><span style=\"font-weight: 400;\">multiple Google Sheets into one<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.22.2&#8243; background_color=&#8221;#f9f9ff&#8221; custom_margin=&#8221;40px||40px||false|false&#8221; custom_padding=&#8221;15px|25px|15px|25px|true|true&#8221; border_width_left=&#8221;3px&#8221; border_color_left=&#8221;#808e95&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><em><strong>Editor\u2019s note<\/strong>: This is a revised version of a previous post that has been updated for accuracy and comprehensiveness.<\/em><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GOOGLEFINANCE function allows you to import real-time financial and currency market data straight into Google Sheets. It also enables you to track current and historical data for various financial instruments, such as stocks and shares. This function imports data from the Google Finance web application. This Google tool provides daily stock prices, financial markets [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":27680,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"In Google Sheets, <a href=\"https:\/\/support.google.com\/docs\/answer\/3093281?hl=en\">GOOGLEFINANCE<\/a> formula helps us fetch the real time securities information from Google Finance web application.\n\nTo gain insights of the performance of stocks, a stock analyst would visit a financial market website and obtain information of various stocks. But instead, he may rather like to compile relevant stock information onto a spreadsheet, and use it for number crunching or build financial models. For that to happen, either they will have to copy the stock information from the internet and paste it onto the spreadsheet, or use customized scripts to pull in such information. The first approach is cumbersome and certainly not recommended. While the second method is faster, it also has drawbacks. Not only it isn't flexible enough, but it could also be a costly affair. The economic alternative to the second method, therefore, is the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093281?hl=en\">GOOGLEFINANCE<\/a> formula.\n<h3>Syntax<\/h3>\n<strong><span style=\"font-family: courier new,courier,monospace; font-size: 14pt;\">GOOGLEFINANCE(ticker, [attribute], [start_date], [num_days|end_date], [interval])<\/span><\/strong>\n<ul>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>ticker<\/strong><\/span> - It is an abbreviation used to uniquely identify publicly traded securities of a particular stock. It may consist of letters, numbers or a combination of both. For e.g. AAPL and MSFT represent the tickers for Apple Inc. and Microsoft Corporation respectively.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>attribute<\/strong><\/span> - This is an optional parameter that specifies the type of information\u00a0GOOGLEFINANCE formula should fetch. Probably, you may want to go through the extensive list of attributes <a href=\"https:\/\/support.google.com\/docs\/answer\/3093281?hl=en\">here<\/a>. Please note, Google Sheets gets us the 'Price' information by default, when we do not input any attribute.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>start_date<\/strong><\/span> - It indicates the date from which the historical data needs fetching. This is an optional parameter. If we specify the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>start_date<\/strong><\/span> but not the <span style=\"font-size: 12pt; font-family: courier new,courier,monospace;\"><strong>num_days|end_date<\/strong><\/span> parameter, then we'll receive only the single day's data.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>num_days|end_date<\/strong><\/span> - This parameter, along with the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>start_date<\/strong><\/span>, will indicate the time frame between which Google Sheets should fetch the stock information.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>interval<\/strong><\/span> - It's an optional parameter that indicates the frequency. The two possible inputs are \"WEEKLY\" and \"DAILY\".<\/li>\n<\/ul>\n<h3>Usage: GOOGLEFINANCE Formula<\/h3>\n<h5>Use Case # 1: GOOGLEFINANCE(ticker, [attribute])<\/h5>\nFor all our illustrations, we'll consider \"AAPL\" (Apple Inc.) for the ticker. We navigated to the <a href=\"https:\/\/www.google.com\/finance\">Google Finance<\/a> website, and keyed in \"AAPL\" in the search box and hit the Enter key. As a result, we see all the current stock indicators of Apple Inc. Alongside, we also have the Google Sheets application open, in which we see how the GOOGLEFINANCE formula pulls the corresponding information into the spreadsheet.\n\n<img class=\"aligncenter size-full wp-image-2631\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/googlefinance1.png\" alt=\"GOOGLEFINANCE Formula - Illustration 1\" width=\"1280\" height=\"760\" \/>\n\nIn the example above, we have hard coded the ticker and the attributes into the formula. As you might have guessed, we can actually do away with that using cell references, as shown below.\n\n<img class=\"aligncenter size-full wp-image-2632\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/googlefinance2.png\" alt=\"GOOGLEFINANCE Formula - Illustration 2\" width=\"555\" height=\"457\" \/>\n<h5>Use Case # 2: GOOGLEFINANCE(ticker, [attribute], [start_date])<\/h5>\nGoogle Sheets provides us with a handful of historic data attributes like \"open\", \"close\", \"high\", \"low\" etc. While we could try them individually, let's explore the \"all\" attribute, which is more comprehensive. This will give us the following result for the corresponding <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>start_date<\/strong><\/span> used.\n\n<img class=\"aligncenter size-full wp-image-2634\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/googlefinance3.png\" alt=\"GOOGLEFINANCE Formula - Illustration 3\" width=\"790\" height=\"102\" \/>\n<h5>Use Case # 3: GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date], [interval])<\/h5>\nSo far we've tried fetching the information corresponding to a single day. Can we do so for a period of time? Yes, we certainly can. Here's an example.\n\n<img class=\"aligncenter size-full wp-image-2635\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/googlefinance4.png\" alt=\"GOOGLEFINANCE Formula - Illustration 4\" width=\"640\" height=\"670\" \/>\n\nGiven the sea of <a href=\"https:\/\/support.google.com\/docs\/answer\/3093281?hl=en\">customization options<\/a> that GOOGLEFINANCE formula provides us, I\u2019d rather encourage you to explore other combinations to find out what works for you the best.\n\nRead the following blog post to learn how to use Google Sheets to manage efficiently your Finance Department: \"<strong><a href=\"https:\/\/www.sheetgo.com\/blog\/finance-processes\/best-online-tools-to-manage-your-finance-department\/\">Best Online Tools to Help You Manage Your Finance Department<\/a><\/strong>\"","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-2630","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/2630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=2630"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/2630\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/27680"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=2630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=2630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=2630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}