+ Reply to Thread
Results 1 to 2 of 2

Using calculated field and inserting results into a formula.

  1. #1
    Registered User
    Join Date
    03-29-2011
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    1

    Lightbulb Using calculated field and inserting results into a formula.

    I currently calculate the beginning and end data rows for each Division. Three divisions and the size of data changes monthly.

    So I calculate for Division 1 (using MATCH), the beginning and end data rows; eg. 2 & 2555. Then I want to use those numbers in a formula without having to to go to formula editor and manually insert them.

    "Median FTR Range": DataAll!$AA$2:$AA$2555 I then use the formula =MEDIAN(DataAll!AA2:AA2555)

    See attached for more details.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,257

    Re: Using calculated field and inserting results into a formula.

    You can have conditional calculations that check column A for specific values, like these array-entered formulas (enter with ctrl-shift-Enter): they will return the correct value even as the data set changes.

    =MEDIAN(IF(DataAll!$A$2:$A$100000="UM_Ann-Arbor",DataAll!$AA$2:$AA$100000))
    =MEDIAN(IF(DataAll!$A$2:$A$100000="UM_Dearborn",DataAll!$AA$2:$AA$100000))
    =MEDIAN(IF(DataAll!$A$2:$A$100000="UM_Flint",DataAll!$AA$2:$AA$100000))

    If you have more than 100,000 rows, just change each of the 100000s to something higher, like 200,000

    =MEDIAN(IF(DataAll!$A$2:$A$200000="UM_Ann-Arbor",DataAll!$AA$2:$AA$200000))
    =MEDIAN(IF(DataAll!$A$2:$A$200000="UM_Dearborn",DataAll!$AA$2:$AA$200000))
    =MEDIAN(IF(DataAll!$A$2:$A$200000="UM_Flint",DataAll!$AA$2:$AA$200000))

    Using too many rows will slow down your calculation, so don't reference entire columns - just enough rows that covers your entire expected data set.
    Last edited by Bernie Deitrick; 09-28-2023 at 04:11 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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] Inserting Calculated field
    By jacob@thepenpoint in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-25-2015, 08:05 AM
  2. Incorrect results from calculated field formula
    By breephi in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-17-2015, 11:11 PM
  3. [SOLVED] Creating a calculated field, count of non-zero items in filtered results
    By JBeaucaire in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-13-2015, 11:37 PM
  4. Replies: 0
    Last Post: 10-24-2013, 10:59 AM
  5. Replies: 0
    Last Post: 02-18-2013, 03:50 PM
  6. Inserting a Calculated Field in Excel 2007
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-28-2007, 07:02 AM
  7. Totals of calculated field in pivot table give incorrect results
    By Jake in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2006, 02:20 PM

Tags for this Thread

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