function error

  1. A

    Code not working after i upgraded from Office 2010 to 2016?

    I just updated my MS Office from 2010 to 2016. All has gone fine however on one file where I have code to calculate distance between two points it has seemed to stop working. Anyone got any ideas here? Public Function GetDistance(start As String, dest As String) Dim firstVal As String...
  2. J

    Unreachable If statement?

    So I am hoping this is a simple issue since I am new to VBA and don't really fully understand how to work with it yet. Goal: Creating a function which can be given a directory and then will find the most recently modified file in that directory and all its sub directories. Problem: The If...
  3. S

    Function help, invalid outside procedure

    Hi all, Excel 2010 / windows 7 I'm trying to assign a value to the current month via 2 function then return it to a destination. I'm all new to function, so I keep getting the error as Invalide outside procedure. First Function to assign a number to the current month Funtion Nmonths() Dim...
  4. W

    Help with Function Error

    I'm simply trying to create a formula that I have been typing manually. The formula typically looks like this: =INDIRECT($B5&"!"&C$1&$F$2)*$H$2 I tried the VBA code: Function Figure(Name, Column, Row, Multiplier) Figure = INDIRECT(Name&"!"&Column&Row)* Multiplier End Function Any...
  5. R

    Find and Replace contents via lists.

    Hi all, I was hoping someone who be able to help me with a find and replace macro I'm working on. The idea is that I will have one long list of data for lots of items listed by code and name, and then with a qty value associated with them. Then I'll have another list of inputs, that will...
  6. T

    Iterating through an Array

    Hi, I have the following code: Function Extract(Products As String) As String Dim softProdArray() As String Dim out As String Dim prod As Variant softProdArray = Split(Products, Chr(10)) For Each prod In softProdArray If InStr(prod, "ORACLE") > 0 Or InStr(prod, "SYBASE") > 0 Or...
  7. T

    Unique Rank formula not always returning unique ranks

    Hello, I am using Excel 2007. I am using the unique rank formula =rank(value,range) + countif(range,criteria) - 1 to give me unique ranks for a set of dollar values. I have two values of .011 that excel will not give me a unique rank (and they are exactly .011 each - they have the same exact...
  8. C

    HELP my function is acting weird

    HELP! This function doesn't always work. sometimes it'll calculate sometimes it won't. I checked auto calculate and i pressed F9. It seems to work sometimes when i retype the formula but considering i have 24months x 2000 clients it can get a little much. Can someone please help audit this for...
  9. H

    VBA Function returns "#VALUE"

    Any ideas why this function returns #VALUE? It's try to return the vega greek for black scholes. All variables are public constants. Function OptionVega(strike, spotprice, time, vol) As Double volrootime = (time ^ 0.5) * vol topline1 = Log(spotprice / strike) topline2 = ((vol ^ 2) /...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top