Issue with Google Finance in Google Sheets for Currency Exchange Rates - excel

I am using the GOOGLEFINANCE() function in google sheets to get an exchange rate for expenses I am entering in for accounting.
The issue is that sometimes I get an #N/A error with the message
When evaluating GOOGLEFINANCE, the query for the symbol: 'PENUSD' returned no data.
The confusing part is that sometimes, perhaps with a refresh of the page after 5 minutes some cells actually start working and others receive the error. I can't pin the problem down.
On another note, it is obvious that this is a poor way to do currency exchange because it is constantly calculating the rate for a past day. Is there a way to get historical exchange rates as a value, one time? I am thinking a script that for every new "date" entered in the date column calculates the exchange rate for that day and enters in the number in the cell next to it.
Is this possible? Are there any better solutions out there? thanks for the help

Yes, indeed very shaky. The formulas sometimes stop working when I switch to another tab and then come back.
What helps me:
Close the tab and reopen (Ctrl-Shift-T). This usualy makes formulas work again for some time.
Select the cells with formulas, copy and paste back as "values only". This will hardcode them, which is actually exactly what I need.

Belated and somewhat unrelated, but you need to prefix with CURRENCY: these days. I.e. CURRENCY:PENUSD.

Related

Displaying duplicate Birthdays in Excel

I have a family list, and I am wanting to display on the dashboard who has a birthday today, additionally, there is sometimes more than one person on the same birthdate. I have been successful using a small test area, but the moment I try to use it on a grand scale, I am cooked. Is there a simpler way?
this is the current formula
{=IFERROR(INDEX($I$21:$I$24,SMALL(IF(TEXT($J$21:$J$24,"m/d")=$J26,ROW($J$21:$J$24)-ROW($J$21)+1),COLUMNS($J27:J27))),"")}
I am sure that it is where I am telling where the columns are that is throwing off the formula, but I barely understand what I am doing.

How to make formula results static [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Or perhaps another way to look at it would be how to make a formula result static...
The problem: I have created an invoicing/booking solution for my business using excel sheets, I have many sheets such as delivery addresses, client data and addresses, bookings, jobs, invoices and so on. There are many many formulas which do different things at different times, for example, if a client books a service for an address the sheet will auto calculate the cost of the service through a series of formulas and IF statements. But if I change any of the data a pricing formula relies on it will recalculate all formulas relating to that data change, an example a customer books today at $100, on their next booking I give that customer a permanent discount of $25 on all future bookings, once I add the discount against the customer, the pricing formulas recalculate all the formulas which could cause obvious accounting issues.
I know wrapping time and date stamps in an if statement can stop a similar issue occuring and that their is also macros that can be written to time stamp on an event, can anything be done with the formulas or is there another workaround to this issue, ive almost got all the functionality I need without using any macros which in itself is an achievement but on the other hand if a macro is the only way, any options it would be great.
In short can anyone offer any solutions to making formula results static to those cells, ie rewrite the formula with the result itself so the result is permanent and therefor only editable manually.
I havent included any screenshots as I couldnt really see what would be relevant, but if there are any bits you'd like to see or have more info on to help answer feel free to ask
It's hard to give you specific advise to implement a non-trivial change on a complex workbook-based pricing application that we have no knowledge of. But here goes...
Make up a new table called CustomerDiscount. That table should have three columns: CustomerID, Date, and Discount. Then rewrite your formulas in your 'transactional' sheet where you are taking booking or whatever, so that they match the CustomerID and Date against the CustomerDiscount table and so pull out the relevant discount that applies after date x.
You can likely find generic examples on Google. The concepts involved here are 'Approximate VLOOKUP' or 'Approximate INDEX/MATCH' so try those search terms in google, and perhaps add something like 'look up next highest date' or similar. I can't give you any more specific advice than that without you having a go at implementing this new 'CustomerDiscount' structure, having a crack at it yourself, and then posting back a much more specific question if you get stuck.
Relying on some trigger to either calculate or not calculate a result is NOT the way to go, because you will always have a nagging fear that something might have been recalculated when it shouldn't have been, and vice versa. You need a audit trail. Without one, you're a sitting duck.
There are 2 potential solutions: 1. You can go to your formula tab, to the calculation section, and select to "manual calculation" on/off. It's default is on. But if you turn it off, you can change anything and keep the values you have. However, you will have to hit "calculate now" every time you make a change and need it updated, this is very easy to forget to do.
Secondly, you can right click on any of the work book tabs at the bottom and select "Move or copy", and you can make a copy to a blank workbook. You can then save that workbook as their invoice/book.
Also, you can copy a cell, or range of cells, then right click and "paste values" in which the formulas are replaced with the values you are currently seeing. You wouldn't want to do this on your master workbook.
Contact me if you think a macro automating this would be useful. Hopefully some or all of these ideas are useful to you! Please leave a comment if you need further explanation.

Calculating Multiple Averages

It's my first time posting a question to this forum. Though I have found answers here many times before, I have been unable to find a solution to my current predicament.
I work in a call center and each week I need to analyze data from the thousands of call that took place over the week. I'm new to programming in Excel-VBA but I've been able to get pretty far.
The data is produced by a third party program and the format is nigh unreadable. Much of the programming I've done so far has been geared towards making the data more organized. Now, I'd like to get into more analysis.
The data is arranged by employee number (NOT in order, though). Each employee takes several calls over the course of the week, some for which the customer takes a survey. It's the survey scores I want. I want to take the average of all the surveys for each employee and then display that average in the same row as each of the entries.
Example
The yellow highlighted area is what I want to add. Any ideas? Thanks for any help in advance!
No need for VBA. If you have the supported version of Excel you can use AVERAGEIF. If not you can use below formula.
Enter as an array formula by pressing Ctrl+Shift+Enter when exiting cell edit mode (instead of just enter).
=AVERAGE(IF($A$2:$A$13=A2,$B$2:$B$13))
Then copy down for all rows.

Select pay rate based on day and shift start time

Im creating an excel pay sheet so i can keep tabs on my pay.
I have two pay rates,
£9.30 is paid for hours worked from 6pm to 8am Monday to Thursday
£10.30 is paid for hours worked from 6pm Friday to 8am Monday.
I have a column that displays the pay rate, i want this to populate automatically with excel looking at the day of the week and then the start time and then returning the correct pay rate.
For example,
If the day is a Mon and the start time is 6pm return £9.30
If the day is Fri and the start time is 6pm return £10.30 etc etc
Any one have any ideas on how i can achieve this? Id rather this be formula based instead of VBA if possible but if it cant be formula based then VBA it is.
Thanks in advance
I had to make a few assumptions because your question was unclear about the possible start times for your shifts. Your wording and examples lead me to believe that your shifts always begin at 6 PM regardless of the day. I created a possible solution or start to a solution based on that assumption that does not rely on VBA. I've included links to an excel workbook with my solution and a screen shot. (I'm only allowed 2 links with my current rep.)
As Gowtham Shiva suggested in the comments, a screen shot of what you have so far would be helpful.
I created two tables and a named ranged called “valDays”. To use the workbook, you enter the date and start time for your shift in tblPay. Enter the pay rate for a specific day and time in tblRates. valDays provides a way to convert the text for a day of the week into a number for calculating date/time serial numbers.
Feel free to comment/message me for clarification. I’ll do my best to reply and refine the solution as necessary. I hope you find this answer helpful and appreciate feedback. This is my first time providing an answer on Stack Overflow.
I’m going to assume you know how to name a range, create tables, and rename tables in excel. If you don’t there are plenty of YouTubers and bloggers that cover these topics quite well.
List the days in a column off to the right. (I used column K.) “Sun”, “Mon”, “Tue”, etc. Select all the cells with the days of the week and name the range “valDays”.
Formula in tblRates[Serial]:
“=MATCH(tblRates[[#This Row],[Day]],valDays,0)+tblRates[[#This Row],[Time]]”
Formula in tblPay[Serial]:
“=WEEKDAY([Date])+[StartTime]”
Formula in tblPay[Rate]:
“=INDEX(tblRates[Rate],MATCH([Serial],tblRates[Serial],0))”
You can download the excel document and view these screenshots of a possible solution.
Link to Excel Workbook on Google Drive
Screenshot1

Excel spreadsheet crash: Thousands of cells become "#NUM!" simultaneously [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
A massive Excel spreadsheet (60 tabs, ranging to 1,000 x 68 cells each), that I've created to analyze traffic pricing in New York City, crashes when I input values outside of a narrow range in one particular cell. By "crashing" I mean that a huge number of cells -- probably tens of thousands -- return "#NUM!" simultaneously.
As you've guessed, the spreadsheet is recursive in that there are hundreds (thousands?) of instances in which data are passed back and forth among different cells ... as must occur in processing travel choice (e.g., raising road tolls reduces auto trips, but the resulting improvement in traffic flow attracts auto trips, which then worsens traffic flow ...).
Is there a way in which I can "slow down" the calculations in order to see where the #NUM! results first appears? Lacking that, I've spent a good deal of time fruitlessly trying to track down the formula or algorithm that causes the initial #NUM! result, which then infects all of the others, rendering diagnosis impossible.
The spreadsheet, approximately 4 MB, may be downloaded via this link: http://www.nnyn.org/kheelplan/BTA_1.1.xls. The cell that leads to the collapsing values is F444 in the "Taxis" worksheet. Its current (saved) value is unity (1.0). Raising it to 4.0 or even some lesser values will make the spreadsheet collapse ... from which it cannot be rebuilt.
I should say that I'm a mathematician and not at all a programmer. Indeed, I'm more of a "numbers savant" than a mathematician.
Thanks in advance. I'm new to this site and am impressed with it.
In Excel 2010 (but maybe after 2007 all has this function) there is an Evaulate formula button at the Formula Auditing group on the Formula tab.
You select an #NUM! field, and use it on, you can go in to the formula, and Evaluate the formula (calculate a segment of an formula). Also, you have in that group a few helper function, like trace dependents/precedents.
EDIT1:
Oh, and you get this error (#NUM!) if:
You calculated somewhere too big number ~ 1E+308 or bigger in a field
You want to do something like this: 0^0
You get somewhere (in one previous field) this error #NUM! which you want to use
EDIT2:
Now, I found your problem (maybe), you want somewhere to calculate too big number with itaration. If you set Maximum Itarations to 1 it hasn't got #NUM! errors. (you can find this at Excel options - Formulas tab)

Resources