Excel iferror for chart series or another workaround - excel

I have a very interesting issue. I'm trying to create a dynamic chart. This works well for the most part, however, when I change one of my parameters it makes the chart references invalid, which causes an incredibly annoying pop-up saying there are invalid references... I've tried to use an iferror([series formula],[generic formula]) but this is an invalid error.
So, I will accept one of two solutions... Either a way to use iferror() with my series, or a way to turn off the obnoxious pop-up message.
Some more pertinent information :
I'm using dynamic named ranges
The dynamic ranges point to validation boxes (another thing I've considered is figuring out a way to auto-update the validation boxes since the issue is caused when validation box A is changed but B and C aren't changed yet.) The image attached will hopefully help explain....
Thank you for any assistance you can give!!

The problem is when the start date is later than the end date, right? Somewhere I usually use MIN(StartDate,EndDate) as my real start date and MAX(StartDate,EndDate) as my real end date.

Related

Getting the excel displayed value

I've been scouring for days and I can't seem find what should be an easy answer. The displayed value is not necessarily the value that from cell.InnerText. I see post after post that requires you to look at the cell.StyleIndex property & cell.DataType.value to determine how to get the displayed value. And while I have plugged in some of this code and it works I hit another case I didnt handle where the cell StyleIndex is null which I can only assume the cell is formatted as "General". The on screen value "-39718.96" while the cell.InnerText returns "-39718.959999999999". I realize there is a easy fix to this by Double.Parse(value).ToString() but there seems to be an endless supply of formats https://stackoverflow.com/a/4655716/1713000 and that's a shortlist and dates are another problem. It seems we are left to handle each different style ourselves. Did Microsoft really not create a public api that returns the formatted displayed value and has no one really written a complete solution to handle this cluster of a mess?
Using Openxml for sheets is very difficult (much more so than using it for Word). If I were you I'd use the ClosedXMl nuget package as it simplifies Openxml for sheets.
Will use the ClosedXML lib instead

Record macro when executing costum add in

I just downloaded a free add in to solve Non Linear Equations with Newton-Raphson's method for Excel it is working great but when i try to record a macro using this add in I don't find it in the code corresponding to the actions i performed on the add in forms. I already tried many times but this add in is checked in references but still nothing recording any solutions ?
I think you should just use solver and insteed of setting the cell value to 0 just set it to 0.0000001 ;) it should work

Time value not being input correctly into spreadsheet

I have a userform set up in Excel. It helps me to enter some values into a spreadsheet. I've used the following code numerous times, and every other time value goes its cell correctly. This one always comes up as "TRUE" on the spreadsheet. I don't know what's wrong.
ssheet.Cells(nr, 18) = Me.jobTravelStart
I've even tried
ssheet.Cells(nr, 18) = CDate(Me.jobTravelStart)
and I still get the same thing.
Ah, Excel and datetime values... Always fun (or trouble).
Problem is that excel uses one datatype for storing datetime values internally, and uses another to display it (I know, I know, this is technically not correct).
To troubleshoot these kind of problems, always go back to source, so check if the stored data is correct. Either use a Debug.Print statement to output the variable while the code is running, or check the local variables when debugging your code.
When you verified that the source is correct, focus on the display part. As xQbert stated in the comments, check the datatype set for the cell you're using to display the data. Make sure the datatype is correct, BEFORE the data is entered into the cell (if need be, you can explicitly do it in code, but that is quite slow, so do it only if there is no other option).
If all this does not help you, please provide more details on how it fails you and what you have found debugging. People can only help you if you provide enough info.

how to display data that is related to a specific cell in excel 2010?

I have created 2 columns, the first has a category of a system using data validation, and the second has the description and failures of that system.
The purpose of that is to open a malfunction on some parts.
In a different sheet I wish to do the same only this time I want to choose the system and the description will automatically appear in the next column showing me all the malfunctions I have written on this system.
I am not very good at all the functions of excel. but I still searched for one that might help me. I have tried using the DGET function but it got me nowhere.
Perhaps try the solution here - it's a bit tricky to explain without copy-pasting the whole thing:
https://superuser.com/questions/536234/excel-how-to-vlookup-to-return-multiple-values
Also take a look at vlookup() if you're working across spreadsheets.
As expected, all of the responses you've seen ehere - and probably elsewhere - are ponyers to VLookup, or a refusal to answer your question.
I'm guessing that you're using DGET() because you need to retrieve data from one named column, using a match for a search term in another named column; and you're that because you can't rely on column ordinals or addresses - you have to do it by name.
VLookup won't do that for you: not without extremely complex and fragile array formulae.
The bad news is: Microsoft NEVER published a working example of a DGET() formula or any corresponding VBA Worksheet Function code.
There's page after page of descriptive text and general explanation in the helpfiles and on MSDN: but no working example. Nobody in Redmond ever sat down and made the DGET() function work with a reproducible set of function parameters and published a screen-shot the working formula.
I'll let you guess why that is.
Maybe there's an example somewhere that is, in effect, a VLookup implemented for known column ordinals using DGET(). If there is, I never found it and you won't either: and it would, of course, be useless for any application where you're working with field names instead of known ordinals.
What you need to do is capture the tabulated data range, with field names in the top row, and pass it to a SQL query using ADODB or MS-Query. That bad new for that is that all the MS-JET Excel drivers have a fatal memory leak.
After that fails, you're left exporting the data somewhere that a proper database app can run the SQL: and that's actually the right thing to do, because your attempt at using DGET() is a relational data query.
If you're left with the need to do this entirely in Excel, you have reached a level of desperation normally associated with the last survivor of an airplane crash who, having devoured the charred remains of his unlucky fellow passengers, is finally forced to contemplate the awful exigency of opening and eating the inflight catering meals.
The grisly details for the equivalent in Excel are a Horrible Hack published here:
http://excellerando.blogspot.com/2014/09/from-time-to-time-it-necessary-to.html

Excel formula not updating for 1 column (works in the rest)

I was not able to find the solution anywhere so maybe someone would be able to think of something.
I have a spreadsheet where one of the tabs is build from the cell values from another ones. This is built with blunt =Paste!AB2. Everything is refreshing properly apart from 1 column.
It keeps on displaying the formula sytnax rather than value. All settings in Excel are set up for automatic updates. I sent the spreadsheet to my friend and it had exactly the same problem. I really dont understand why.
Any ideas?
I cant add a screenshot as I lack reputation :)
Check the cell types. (Format Cells -> Number Tab) They are probably set to Text.
If so, change the types to General, then re-enter the formula

Resources