+ Reply to Thread
Results 1 to 7 of 7

Can I call a cell value from inside a formula?

  1. #1
    Registered User
    Join Date
    03-04-2015
    Location
    Texas
    MS-Off Ver
    2007
    Posts
    23

    Angry Can I call a cell value from inside a formula?

    I am trying to process average values for something over more than a century with daily measurements converted to annual mean values. I am using the following formula to get annual averages for this value ...

    =AVERAGEIFS(D:D,C:C,">=1/1/1903",C:C,"<=12/31/1903")

    Here is my question. In this formula, instead of "1903" I would like it to call the cell value in the preceding column (in this case, column I; column config sample below question) so that I don't have to type in the year for 100+ formulas. Can I do that? And if so, ho?

    Thanks for any help.

    ______________________________________________




    COLUMN C ... COLUMN D ... COLUMN I ... COLUMN J (results)

    Date ... Discharge ... Year ... Discharge, cubic feet per second (annual average)

    ... ... ... ... ... ... ... ... ... 1903 ... 465.64130435
    10/1/1903 ... 910 ... 1904 ... 448.03278689
    10/2/1903 ... 4580 ... 1905 ... 1697.29041096
    10/3/1903 ... 5550 ... 1906 ... 1681.21917808
    10/4/1903 ... 4170 ... 1907 ... 1079.21917808
    10/5/1903 ... 3300 ... 1908 ... 3935.60928962
    10/6/1903 ... 4400 ... 1909 ... 145.13150685
    10/7/1903 ... 5750 ... 1910 ... 215.76164384
    10/8/1903 ... 3300 ... 1911 ... 97.60000000
    10/9/1903 ... 2200 ... 1912 ... 243.38251366
    10/10/1903 ... 1370 ... 1913 ... 1072.18356164
    10/11/1903 ... 1130 ... 1914 ... 1401.09863014
    10/12/1903 ... 815 ... 1915 ... 2389.82739726
    10/13/1903 ... 395 ... 1916 ... 1878.98633880

    ... continues until 2014

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,226

    Re: Can I call a cell value from inside a formula?

    It would be easier to work with an Excel sheet - rather than this,. can you post a sample sheet?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Can I call a cell value from inside a formula?

    Don't use whole columns like C:C D:D it slows the calculations down

    Try
    =AVERAGEIFS(D1:D1000,C1:C1000,">="&E1,C1:C1000,"<="&F1)

    where E1 and F1 are proper dates (not just a year)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    03-04-2015
    Location
    Texas
    MS-Off Ver
    2007
    Posts
    23

    Re: Can I call a cell value from inside a formula?

    Here is a partial version of the sheet.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-04-2015
    Location
    Texas
    MS-Off Ver
    2007
    Posts
    23

    Re: Can I call a cell value from inside a formula?

    Thank you, Special-K. That seems to work great.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,226

    Re: Can I call a cell value from inside a formula?

    An alternative:

    =AVERAGEIFS(D:D,C:C,">="&DATE(I8,1,1),C:C,"<="&DATE(I8,12,31))

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Can I call a cell value from inside a formula?

    Or with your current data, try this....

    In J8
    Please Login or Register  to view this content.
    and copy down.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. Replies: 10
    Last Post: 04-27-2014, 08:16 AM
  2. Call for Password if ComboBox inside of Userform = certain value
    By CRIMEDOG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2011, 07:50 AM
  3. Workbooks.Open inside Function call
    By twd000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2010, 12:52 PM
  4. Replace tab value inside formula with cell value
    By Haywire in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-10-2010, 04:04 PM
  5. Using a value from a cell inside a formula!
    By marsupilami in forum Excel General
    Replies: 5
    Last Post: 08-24-2005, 02:06 AM

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