+ Reply to Thread
Results 1 to 3 of 3

how to set a variable x to apply to the same formula across a spreadsheet

  1. #1
    Registered User
    Join Date
    11-26-2018
    Location
    Chipping Norton
    MS-Off Ver
    365
    Posts
    2

    how to set a variable x to apply to the same formula across a spreadsheet

    Cumbersome title, sorry.......and sorry if that this is a simple one.

    I use a spreadsheet to collate the hours worked on different clients and then apply the same formula to each client to work out deductions for corporation tax etc. Simply £(amount)*30%. Occasionally I need to change 30%. I want to call the % figure x and then simply change the value of x once so it applies to all of the clients. Can't quite get my head around Formulas>Define Name>Scope if that is the right way to do it.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: how to set a variable x to apply to the same formula across a spreadsheet

    Yes, you can do that like that -- in this case the name is referring to a constant, so

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    then in your cells:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    you could also store the 0.3 in a summary tab in your file, and reference that explicitly -- e.g.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    where Summary!A1 holds 0.3... and if you prefer to persist with "x" you can name Summary!$A$1 "x" (i.e. refers to a cell, rather than a constant)

  3. #3
    Registered User
    Join Date
    11-26-2018
    Location
    Chipping Norton
    MS-Off Ver
    365
    Posts
    2

    Re: how to set a variable x to apply to the same formula across a spreadsheet

    Thanks so much for the prompt reply

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Commandbutton to apply textbox/combobox values to next available row in spreadsheet
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-18-2016, 03:30 AM
  2. [SOLVED] Using VBA Hlookup to apply Userform Textbox value to Excel spreadsheet
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2016, 07:20 PM
  3. How to automatically apply fixed set of calculations to data of variable column and row nu
    By francisobrien2007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2015, 09:40 PM
  4. [SOLVED] VBA Code to apply data from user form into spreadsheet.
    By mezza89 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2015, 05:57 PM
  5. Macro: Filter spreadsheet, then apply formula to results
    By RC-AMG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2015, 08:14 AM
  6. Replies: 1
    Last Post: 07-31-2009, 10:50 AM
  7. Using code and apply to other spreadsheet?
    By bsnapool in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2006, 03:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1