dateexcel-formularange

In Excel how to find days from dates in a specific cell date minus date in same row column without specified cell


Here is an example of what I am trying to do:

    A          Date         C        D
   ------   --------   ------   --------
1  Today    [=TODAY()]

   A          Date         C        D
  ------   --------   ------   --------
2  iuiouiu   1/2/23    iuoui    =DAYS(Date1,ROW(Date))???
3  iuiouiu   8/8/23    iuoui
4  iuiouiu   12/2/23   iuoui

I want column D to tell me the days from B1 minus A2 but without using A2, like referencing the same row in a different column "Date". Reason being that I need to filter a large table that changes length data. Running the formula with specific cell address would be too hectic. The columns are consistent, and I only need a portion of the date range on a smaller set.


Solution

  • I think you are referring to something like this for D2 cell:

    =DAYS($B$1,INDIRECT("R"&ROW()&"C"&(COLUMN()-2),FALSE))