vba function

  1. D

    Use VBA Function to calculate the rank

    I want to create a VBA function to calculate the rank, like that Function CALCULATERANKING(score As Double, list As Range) As Integer Dim row As Integer Dim column As Integer CalculateRanking = 1 For row = 1 To list.Rows.count If list.Cells(row, 1).Value > score Then...
  2. M

    Word Function returning Run Time Error '438 when called in Excel

    Hi Everyone I have been creating a macro in excel that will pull information from an excel sheet and insert into a word document. After much trial and error I have managed to get it to insert all the information I want but I am now stuck on changing the formatting of what is inserted. After...
  3. M

    vba function ThisCell.Address

    I have this function: Function student() student = Range("'" + Range("B1").Value + "student'!" + Application.ThisCell.Address).Value End Function I use this function in worksheet1. The value in B1 gives the name of another worksheet, let's say ws2. I need to pick up the value in that other...
  4. D

    Create VBA Function using existing Excel Functions

    <tbody> Reference Result of Formula Dog 1 Dog 1 Cat 2 Cat 2 Cat 2 Horse 1 Sheep 2 Sheep 2 </tbody> Hi, I’m hoping someone can help me with writing a VBA code to create a function that converts a formula I use to an easier function, using existing Excel...
  5. S

    Fuction for Quality Check

    Hello All, If some come can point me to right resources I would appreciate it. My problem is that I would like to create function =QC() that returns "Good" or "Bad". And I would use it to check all "code numbers" if they have less then 6 character to return text "Bad" next to a cell. If...
  6. K

    Custom VBA what-if scenario function?

    Hi, I need a non-invasive custom VBA "what-if" scenario function as follows: WHATIF(Output_Cell, Cell1, Value1, Cell2, Value2, ...) This would give the hypothetical value of the output cell if each of the given input Cells 1 to X were changed to the respective scenario values 1 to X, but...
  7. K

    Custom VBA solver/goalseek function?

    Hi, I need a non-invasive custom VBA solver/goalseek function as follows: SOLVE(Output_Cell, Target_Value, Input_Cell) This would give the hypothetical value of the input cell that would give the target value in the output cell, but without actually changing the value in the input cell. It...
  8. K

    Function or Formula to return date last modified?

    Hello, I am wondering if there is a simple Excel Worksheet Function (or less ideally, a custom VBA-defined Function) which can automatically return the date last modified, i.e., when the document was last updated/modified, recalculated and/or saved? Thanks for any tips. K.
  9. B

    Adding intellisense to VBA functions

    Hi there, Is there any way of adding intellisense to my VBA functions ? Some of the functions I write have quite a few parameters to them, and it'd be nice to be prompted about which parameters need to be passed to the function which order. As it stands, I'm constantly having to refer...
  10. 3PlankWalker

    Multiple Output from a Function giving zero

    I have writen this code to give Multiple Output from a Function but its All the Values as zero, Sub Trial()Dim X As Double, Y As Double Dim LlByL As Double, BbByB As Double Dim Trail1 As Double For X = 0.1 To 1 Step 0.1 For Y = 0.1 To 1 Step 0.1 Trial1 = Case2(X, Y, LlByL, BbByB)...
  11. J

    MINIFS VBA Function

    {=MIN(IF(($B$2:$B$65536="A")*($C$2:$C$65536=1),$A3:$A65336))} I currently have the above function on an excel sheet, I was wondering if anyone had a function to calculate the MIN via VBA instead? For all intents and purposes the sheet i'm looping through looks like: Date Str1...
  12. C

    Function not reliably feeding data back?

    I apologize for posting this again. This is an update of an issue I posted yesterday. I forgot to add a tag to that post and Could not see how to update it. Hope someone can help with this...it is beyond bizzare. I watched this several times now. n = the number of columns of data. When n=4...
  13. M

    NumName: Excel VBA Function to Convert Huge Long Numbers into their Numeric Word Names in a Text String Format

    I made an Excel function that converts a large string of numbers into their numeric word names. I am offering it to the community as free public domain. It has many parameters to control the desired output. You can choose USA or European names with a simple parameter change. English names are...
  14. O

    Help! my VBA function doesnt result right

    Hi, I have searched the net for a solution but found non. My goal is to write a function that I can use anywhere in a work book. The function gets a project number (integer) & returns the last Bill number of the project as a string. this will save me using the DB functions (they are not...
  15. A

    VBA Function Help Requied - Real Estate Problem

    I am trying to define some calculations for various rental review profiles in a real estate cashflow. The problems being that there are to many variables and as such I want to create functions in VBA to cater for them. Example 1: - Fixed% review with a cap, collar and ratchet (little...
  16. J

    VBA Function: check last modified date of files with wildcards in name and path

    VBA Newbie here. Please forgive any protocall mistakes: I currently use the following to test for files to exist after running a batch to copy them from various locations on a network. Works well allows wildcards in path, file name and extension. Private Function IsFileTrue(fDriveFolder...
  17. J

    Need more efficient VBA Script

    I have a list of control checkboxes, Alpha-Delta. They are all on a form, within a frame. I need an efficient script that will do the following: If one of the boxes is checked, then the rest are set to false and disabled. Is there an easier way to do this rather than writing code for each...
  18. P

    Weeks Cover for Inventory

    Hope some can help - My problem is I wish to write a custom function which I can Use to calculate the weeks cover of current inventory based on a sales forecast. the forecast is in weekly buckets so I was thinking using some form of loop statement within the function which basically starts with...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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