excel

excel IF formula question

i am building a formula like this: =if(a1="something" or a1="alex","returned","not found") but i guess the syntax is wrong. what is the correct way to write this? ...

Formulas in PHP

To a person skilled in programming, I know this question might seem ridiculous, but please bear with me. I'm involved in a court case and a critical point hinges on the answer to a couple of questions. Given a mathematical formula, along with complete formula documentation as shown here: (Pixelated some of the descriptors) In solvin...

IF , OR formula not working in VBA

i have this formula in VBA: ActiveCell.FormulaR1C1 = "=IF(OR(A2=""ETG_C"",A2=""ETGC""),C2,""na"")" when i look at the activecell it actually returns this formula: =IF(OR('A2'="ETG_C",'A2'="ETGC"),$B:$B,"na") how do i force it to adhere to the first formula? ...

Return values only if they are not present in current column

I have a column to which I am adding data from another column I would like to check whether that column has the data that I wish to add. Can you help me with a formula that will tell me whether a certain value exists in the current column? Please keep in mind it is a bit more complex than it sounds. Currently I have this in the cell: ...

Find file that could be in one of three locations

i need to write a vba script that will find a file. the file could be in three different locations how do i find where the file is? the file must have a specific string as part of the file name my file name could be 9424.bas or 9424a.esy or 9424_.bas or 9424...esy, i dotn know what the file name exactly is but i know the important cha...

vba: how do i open a file if i only know part of the file name?

i need to open a file whose full filename i do not know i know the file name is soemthing like filename*esy i know definitely that there's only one occurrence of this file in the given directory ...

ERROR! (Using Excel's named ranges from C#)

In the following, I am trying to persist a set of objects in an excel worksheet. Each time the function is called to store a value, it should allocate the next cell of the A column to store that object. However, an exception is thrown by the Interop library on the first call to get_Range(). (right after the catch block) Does anyone kn...

How do you place an Excel Sheet/Workbook onto a C# .NET Winform?

I am trying to create a stand alone application in Visual Studio 2008 C# .Net that will house Excel Workbooks (2007). I am using Office.Interop in order to create the Excel application and I open the workbooks via Workbooks.Open(...). The Interop does not provide any functionality to "move" the workbooks onto a form so I turned to P/I...

Accessing an excel file throws OleDbException but keeps handle on file

Really odd that I'd get an oledbexception but turns out that the file's handle is still with the original file. I've been searching through google and keep finding the same problem but no solutions. Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filePath + ";" + "Extended Properties=Excel 8.0;"; Note that...

Spreadsheet component with VBA support

I am looking for a .Net spreadsheet component that could also execute the VBA contained in Excel files. I found Spreadsheet Gears to be very nice for manipulating and allowing the user to edit Excel files, but on spreadsheets that use VBA for calculations, well, these don't work. So, apart from Excel itself, are there any other compone...

Export to Excel in linq

We are doing an File management project We need a same excel format Please help me to do the same ...

Excel VBA: NetworkDays Error 2015

Hi All, I have the this bit of code in a VBA class which is to workout the number of days between a property of the class (a date) and today’s date. Dim EmailDate As Date EmailDate = Me.Email.DateReceived Debug.Print EmailDate, Date Debug.Print NetworkDays(EmailDate), Date, Range("BankHolidays")) When I run it I get the following ou...

Align line markers with specific column series in Excel chart

I have an Excel chart with multiple series that are of type column clustered. I also have a series of type scatter on the same chart. The X values for all the series are the same. By default Excel will horizontally center the scatter points with the columns. My question is, is it possible to line up the scatter points with a specific col...

Excel: VLOOKUP that returns true or false?

In Excel we have the VLOOKUP function that looks for a value in a column in a table and then returns a value from a given column in that table if it finds something. If it doesn't, it produces an error. Is there a function that just returns true or false depending on if the value was found in a column or not? ...

How do I run some VBA code when a cell is changed?

I want to add some VBA code when the value in a cell changes. I've already tried Worksheet_Change(), as described at http://www.contextures.com/xlfaqmac.html#WSChange However, this won't work: it only fires when the user changes the value. I want to fire it whenever the value changes, i.e. whenever the spreadsheet recalculates. Any id...

Tell AppleScript to go to a specific window in Excel

I've got a script that pulls information from an Excel(Mac Excel'04) spreadsheet, and processes it through a local database. My problem(which is temporary, pending a dedicated scripting machine w/ Excel '08) is when I need to work on another spreadsheet in Excel. I want to ensure that the AppleScript continues reading data from the cor...

Webbrowser locks first Excel Instance

VB.NET 2008 - WinForms Hi Everyone! I've been looking for an answer to my problem but I only find more questions related to my problem... The thing is that I'm using a AxWebBrowser control in VB.NET 2008 to open a excel file in a WindowsForm, it opens succesfully and everything... but the problem is this: If I had a Excel File Open b...

How do you replicate changes from one excel sheet to another in two separate excel apps?

This is all in C# .NET Excel Interop Automation for Office 2007. Say you create two excel apps and open the same workbook for each application: app = new Excel.ApplicationClass(); app2 = new Excel.ApplicationClass(); string fileLocation = "myBook.xslx"; workbook = app.Workbooks.Open(fileLocation, Type.Missing, Type.Missin...

Automatic Data sorting/ analysis in Excel

I have data in the form of four columns. The first three columns represent time, value1, value 2. The fourth column is binary, all 0's or 1's. Is there a way to tell excel to delete time, value1 and value 2, when the corresponding binary value in column four is 0? I know this is a lot easier in C++ or matlab, but for reasons beyond my c...

how to make a frequency function in matlab like the excel frequency function?

I have a list that is sorted and I want to know how many values are in each bin? I made bins using linspace(floor(fist_element_list), ceil(last_element_list), num_bins) Is there a built in function or an easy way to do this in Matlab? All I can think of is doing it manually. I would like a frequency function like the one in excel. ...