Forum Discussion
PaulM1970
Apr 24, 2024Copper Contributor
Need help with counting the last digit of a number
Hi team! Respectfully request help with the following: Need a formula in cell D3 of Sheet2 that accomplishes the following: If Sheet1 column D says, "Acme", count the number of times the ...
HansVogelaar
Apr 24, 2024MVP
=SUMPRODUCT((Sheet1!$D$2:$D$1000="Acme")*(MOD(Sheet1!$C$2:$C$1000, 10)=B3))
If you have Microsoft 365 or Office 2021, you can use SUM instead of SUMPRODUCT.
PaulM1970
Apr 26, 2024Copper Contributor
Hi HansVogelaar
Same guy. Different username here.
How would I merge this prefix to the formula you provided?
=COUNTIFS(Table5[Site],$B$2,
(Table 5 is the table found on what I'm referring to as sheet1)
B2 is a dropdown list of sites. The formula you came up with would then pull data from the sheet1 rows containing the site listed in cell B2.
Same guy. Different username here.
How would I merge this prefix to the formula you provided?
=COUNTIFS(Table5[Site],$B$2,
(Table 5 is the table found on what I'm referring to as sheet1)
B2 is a dropdown list of sites. The formula you came up with would then pull data from the sheet1 rows containing the site listed in cell B2.
- HansVogelaarApr 26, 2024MVP
Could you post the version of the formula that I provided with the table references instead of the range references?
- PaulM1970Apr 26, 2024Copper ContributorYes sir. See below. This is how I modified what you sent, to make it work with my tables:
=SUM((Table1[@Company]="Acme")*(MOD(Table1[@Code], 10)=B3))- HansVogelaarApr 26, 2024MVP
Change it to
=SUM((Table1[Site]=$B$2)*(Table1[Company]="Acme")*(MOD(Table1[Code], 10)=B3))
Use the correct table name - you mentioned both Table1 and Table5.
Please note that I removed @ from your formula.