constants

  1. wsnyder

    Constant Expression Required

    Hi all, Using Excel 365. My code is returning an error: I believe I declared the Constant correctly. I tired to move the path directly to the function call, bypassing the constant declaration and it worked as expected. Not sure what is goin on here? Thanks, -w Sub Test_GetFile() Const...
  2. W

    RANK gives different rank for same value

    Hi guys, I'm getting totally crazy over the RANK-function. In this sheet, B2 = RANK(A2,$A$2:$A$3) and B3 = RANK(A3,$A$2:$A$3), and as you can see, it gives me two different ranks for the same value. These are constants (not formulas) and prove that the value is the same, formula in C2 =...
  3. D

    Referencing Public Constants in Cell Formulas

    0 <button class="js-vote-down-btn grid--cell s-btn s-btn__unset c-pointer" title="This question does not show any research effort; it is unclear or not useful" aria-pressed="false" aria-label="down vote" data-selected-classes="fc-theme-primary" style="margin: 2px; box-sizing: inherit; font...
  4. C

    Is it possible to create named constants in Power Query

    I'm wondering if it's possible to create your own named constants in PQ, like Order.Ascending (which equals 0) and Order.Descending (which equals 1)? Thanks
  5. E

    Master reference table, suggestions

    Hi, I'm working on an excel book to simulate outcomes from a game. I have 6 different sheets covering various aspects of the game, and the formulas in these 6 sheets all draw from a set of common constants. These constants I need to change every month (as the game change). Right now I just keep...
  6. M

    Best way to create and use constants in Power Pivot?

    For my model I have constants to be applied such as projected inflation rate, depreciation years, and other values to be set by users as what-if options. There are too many variations the users want to create disconnected tables - e.g. listing every inflation rate by hundredths of a percent -...
  7. H

    VBA-code with array-input and array output

    Hi all,I am trying to program something in VBA. The inputs are matrices which varies on the amount of stocks, which is unfortunately not the same all the time.I already managed to get VBA to calculate 4 constants (A, B, C, D) with the matrices as input, there will always be only 4 constants, but...
  8. P

    Tweet from Excel

    Hi, I have an extremely tight deadline (Monday) to create a spreadsheet with 2 sheets, 1 tab with have the twitter constants and the second tab will have a button that will post what ever is in "A1" to the given twitter account from the constants on the first tab. Does anyone have something...
  9. P

    Is it possible to pass parameter(s) to an excel workbook? Then what is called a workbookparameter?

    What is called an excel workbookparameter? If we can change a name into a workbookparamter, can we pass variables to an workbook? One more question: I have given a name for a constant. Constant's Value = 10 Name of the constant = Constant1 But Activeworkbook.names("Constant1").value is giving...
  10. A

    Assigning values to constant from userform in VBA

    I would like my code to take a value from textbox in the userform and use it as a constant for declaring values to other function for eg Const i1max=userform1.textbox1.value dim sys(1 to i1max) as computertype I am getting a compilation error stating that constnt variable should be defined...
  11. C

    XL2007 VBA Transpose Using R1C1 References & Public Constants

    Hi, I can't figure out why the following won't work. I have adapted code posted by user VoG on the thread http://www.mrexcel.com/forum/excel-questions/490018-visual-basic-applications-copy-column-data-into-rows.html into my workbook as; Sheet2.Range("A2").Resize(2928, 80).Value =...
  12. J

    The best way to code static column values

    Hello everyone, I hate to start a new post so many apologies if the answer is there and I've missed it, but... I need a little help with understanding the best way to code something. I have a spreadsheet with about 30 or so columns on it. My code at the moment references the columns directly...
  13. K

    vbscript excel constant values

    Hi There Excel 2007. i am creating an excel document with vbscript from another application. Q: Does anyone know if there is a list somewhere of all the vbscript value constants e.g. HorizontalAlignment = -4108 many thanks
  14. A

    Constant Variables

    Ok ...so I have a userForm (Form1) that contains a persons name that I would like to reference in a separate UserForm (Form2). In the separate UserForm (Form2) I need to reference this persons name many times, so I was wondering if there was a was to declare this name in the separate UserForm...
  15. ClimoC

    SuperQuick Q: Constants...?

    So a Const/#Const only work as Private compiler constants... ie, for the module within which they reside. Can I have a Public compiler constant at all? Essentially, before every script in my 20 modules and forms runs, I want it to obtain the value from Sheet3, Cell E2 I would've thought...
  16. O

    Setting a public variable as a constant

    Hi all, I've got some code that calls a public variable. If I run the code a second or subsequent times it fails I have the public variable set Public FileName As String in module6 The information set in the variable is gained from this bit of code Sub ImportTextFile() Sheets("Raw...
  17. J

    No Cells Found Error Handling

    How can I handle the "No Cells Found" error when using .SpecialCells(xlCellTypeBlanks) or .SpecialCells(xlCellTypeConstants) or better yet, suggest something else to use :) Background info: I have a form, the user selects a value from a combobox. Using the selected value, a listbox beneath...
  18. P

    Automatically highlight values

    Hello, Is there a way to make a worksheet change event that will evaluate the cells in the range G42:J60 and highlight any cell that does not contain a formula? Basically if someone "types over" one of my formulas with a constant value, I want it to stand out with a yellow-colored highlight...
  19. B

    constants (display name & calculate value)

    I am trying to create a simple table of numbers and constants (3 letter text strings). cell naming won't help me as I would like the constants to display in the table, yet be calculated by their values. say I have these constants: DNC=14, DNF=16...
  20. D

    Constants equal to Defined Name VBA

    Is it possible to do this: Originally I would set a constant, this is a pain because I would need to change all of the ranges manually if a row was added to my table: Private Sub Worksheet_Change(ByVal Target As Range) Const MONTH As String =...

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