shorten 2 divide formulas

excelNewbie22

Well-known Member
Joined
Aug 4, 2021
Messages
528
Office Version
  1. 365
Platform
  1. Windows
hi, how can i shorten this into one? but by counting the true ones (sum?)
Cell Formulas
RangeFormula
I2I2=MOD(H2,G2)=0
J2J2=MOD(H2,F2)=0
K2K2=MOD(H2,E2)=0
L2L2=MOD(H2,D2)=0
M2M2=MOD(H2,C2)=0
N2N2=MOD(G2,F2)=0
O2O2=MOD(G2,E2)=0
P2P2=MOD(G2,D2)=0
Q2Q2=MOD(G2,C2)=0
R2R2=MOD(F2,E2)=0
S2S2=MOD(F2,D2)=0
T2T2=MOD(F2,C2)=0
U2U2=MOD(E2,D2)=0
V2V2=MOD(E2,C2)=0
W2W2=MOD(D2,C2)=0


same thing to this one?
Cell Formulas
RangeFormula
I2I2=MOD(C1,C2)=0
J2J2=MOD(C1,D2)=0
K2K2=MOD(C1,E2)=0
L2L2=MOD(C1,F2)=0
M2M2=MOD(C1,G2)=0
N2N2=MOD(C1,H2)=0
O2O2=MOD(D1,C2)=0
P2P2=MOD(D1,D2)=0
Q2Q2=MOD(D1,E2)=0
R2R2=MOD(D1,F2)=0
S2S2=MOD(D1,G2)=0
T2T2=MOD(D1,H2)=0
U2U2=MOD(E1,C2)=0
V2V2=MOD(E1,D2)=0
W2W2=MOD(E1,E2)=0
X2X2=MOD(E1,F2)=0
Y2Y2=MOD(E1,G2)=0
Z2Z2=MOD(E1,H2)=0
AA2AA2=MOD(F1,C2)=0
AB2AB2=MOD(F1,D2)=0
AC2AC2=MOD(F1,E2)=0
AD2AD2=MOD(F1,F2)=0
AE2AE2=MOD(F1,G2)=0
AF2AF2=MOD(F1,H2)=0
AG2AG2=MOD(G1,C2)=0
AH2AH2=MOD(G1,D2)=0
AI2AI2=MOD(G1,E2)=0
AJ2AJ2=MOD(G1,F2)=0
AK2AK2=MOD(G1,G2)=0
AL2AL2=MOD(G1,H2)=0
AM2AM2=MOD(H1,C2)=0
AN2AN2=MOD(H1,D2)=0
AO2AO2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BT3BT3=MOD(H2,F3)=0
BU3BU3=MOD(H2,G3)=0
BV3BV3=MOD(H2,H3)=0
BX3BX3=MOD(C3,D2)=0
BY3BY3=MOD(C3,E2)=0
BZ3BZ3=MOD(C3,F2)=0
CA3CA3=MOD(C3,G2)=0
CB3CB3=MOD(C3,H2)=0
 
The J5 formula should do that for you. I think you missed 6/3, 6/2, and 4/2 in your count of 9, so those 3 bring it up to 12, like the example shows.

Or do you mean, what is the count if you use the second row as the dividends, and the first row as divisors? Then try:

Excel Formula:
=LET(rngA,C3:H3,rngB,C2:H2,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0)))
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
hi,
Or do you mean, what is the count if you use the second row as the dividends, and the first row as divisors? Then try:
yes, but i need to know the count of row 1 against #2 and vice versa, alltogether
but for that bit i can just join the two unless there's a fancier way

and also if a number repeat itself in both rows, for the formula to count it too (like 3 and 3)

for example:
test
CDEFGHIJK
1should be
2123479
3345602
4total
5711
test
Cell Formulas
RangeFormula
J2J2=LET(rngA,C3:F3,rngB,C2:F2,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0)))
J3J3=LET(rngA,C2:F2,rngB,C3:F3,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0)))
J5J5=LET(rngA,C3:F3,rngB,C2:F2,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0)))+LET(rngA,C2:F2,rngB,C3:F3,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0)))


edit:
for the part of same number in both rows, i think i got it
Excel Formula:
=LET(rngA,C3:F3,rngB,C2:F2,t,TRANSPOSE(rngB),SUM((rngA>=t)*(MOD(rngA,t)=0)))
is that right?
for the part of sum of two of the rows against each other, still not sure, what say you?
 
Upvote 0
just noticed that if do it my way, like in j5, if there's duplicate number in both rows, it will count it twice, which is no good
 
Upvote 0
Maybe:

Book1
ABCDEFGHIJK
1should be
2123499
33456
Sheet1
Cell Formulas
RangeFormula
J2J2=LET(rngA,C3:F3,rngB,C2:F2,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0)))+LET(rngB,C3:F3,rngA,C2:F2,t,TRANSPOSE(rngB),SUM((rngA>t)*(MOD(rngA,t)=0))+SUM(COUNTIF(rngA,rngB)))


This is becoming more and more abstruse. Can you explain what you're using this for? I've been in math and computing a long time, and I can't see how this would be useful. There might be other options.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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