Using date from a cell in a formula

TheGREATrandino

New Member
Joined
Sep 9, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I want to use the date, stored as a date, in a cell in a formula in another cell.
I have a table with columns Date, Payee, memo, purchases, payments, and so forth.
When I place the cursor in any cell in the table, it uses a sumifs function to sum all purchases with a date equal to the date in the date column. The sumifs command is in a cell outside of the table.
I tried several things. The last was =SUMIFS(tbl_Transactions[Paymennts],tbl_Transactions[Date],"= date(INDIRECT(B&CELL(row),m/d/yy)",tbl_Transactions[Paymennts],"<>Credit Card Payment") which returns 0
I did a similar command for purchase by account with =XLOOKUP(INDIRECT("A"&CELL("row")&""),Tbl_Accounts[ID],Tbl_Accounts[Balance])
44078​
 

Attachments

  • Annotation 2020-09-09 102725.jpg
    Annotation 2020-09-09 102725.jpg
    110.9 KB · Views: 8

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If i understand your formula correctly, does just using
Excel Formula:
INDIRECT("B" & ROW())
not work for you, without the date prefix and the equal sign and putting in double quotes
Excel Formula:
 =SUMIFS(tbl_Transactions[Paymennts],tbl_Transactions[Date],INDIRECT("B"&CELL(row)),,tbl_Transactions[Paymennts],"<>Credit Card Payment")
 
Upvote 0
UPDATE !!!
I place =TEXT((INDIRECT("B"&CELL("row")&"")),"m/d/yy") in a blank cell above the table and it returned the date in column B of the row that the cursor is on, as desired.
I then place it in the sumif command using the function wizard in the criteria section and it worked!!!

=SUMIFS(tbl_Transactions[Purchases],tbl_Transactions[Date],TEXT((INDIRECT("B"&CELL("row")&"")),"m/d/yy"),tbl_Transactions[Memo],"<>Credit Card Pmt")
 
Upvote 0
and INDIRECT("B" & Row()) doesn't return what you need, if you format the cell as Date
 
Upvote 0
and INDIRECT("B" & Row()) doesn't return what you need, if you format the cell as Date
INDIRECT("B" & Row()) does not work, returns 0
INDIRECT("B"&CELL("row")) <Note the nested CELL function) returns a number which when formatted as a date does return the correct date.
When I use INDIRECT(..... as criteria in the sumifs command it does in fact work.
So............
I do not need to use the text function and the format of the date.
If I want the date from the column on the row where the cursor is don't I need the cells function
 
Upvote 0

Forum statistics

Threads
1,215,464
Messages
6,124,969
Members
449,200
Latest member
Jamil ahmed

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