shorten 2 divide formulas

excelNewbie22

Well-known Member
Joined
Aug 4, 2021
Messages
534
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
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
anyone can help with the two rows? c2:h3 ? Did you try the suggestions? Can you clarify your requirement?

T202212a.xlsm
ABCDEFGH
288123456
322389101112
41111124466
522489101112
1f
Cell Formulas
RangeFormula
A2:A5A2=SUM(MAKEARRAY(1,5,LAMBDA(r,c,SUM(--(MOD(INDEX(C2:H2,,c+1),DROP(C2:H2,,c-6))=0)))))
B2:B5B2=SUM(--(MOD(H2,C2:G2)=0),--(MOD(G2,C2:F2)=0),--(MOD(F2,C2:E2)=0),--(MOD(E2,C2:D2)=0),--(MOD(D2,C2)=0))
 
Upvote 0
Something like this?

Book1
ABCDEFGHIJK
1
21234568
37891011120
4
5232 rows
Sheet1
Cell Formulas
RangeFormula
J2:J3J2=LET(rng,C2:H2,t,TRANSPOSE(rng),SUM((rng>t)*(MOD(rng,t)=0)))
J5J5=LET(rng,C2:H3,r,SMALL(rng,SEQUENCE(COUNT(rng))),t,TRANSPOSE(r),SUM((r>t)*(MOD(r,t)=0)))


Note that these formulas do not require the numbers to be in ascending order, but it will give erroneous results if there are duplicate values in a row. I can probably figure that out if needed.
 
Upvote 0
Eric W, great! thank you!

is there no way of marking two solutions?
i think there's the need to do so

p.s
there isn't two identical numbers in a row
 
Upvote 0
eric, is it possible to find only the dividable numbers between the two rows?
like c2 against c3 and d3 and e3 and f3 and g3 and h3 and etc
but without the c2 against d2 and e2 and etc
?
if not, still good
 
Upvote 0
How do you want to identify them? By Conditional Formatting, or maybe a list?

Book1
ABCDEFGHIJK
1
229234563
37891011120
4
5122 rows
6
74
86
98
109
1110
1212
13
Sheet1
Cell Formulas
RangeFormula
J2:J3J2=LET(rng,C2:H2,t,TRANSPOSE(rng),SUM((rng>t)*(MOD(rng,t)=0)))
J5J5=LET(rng,C2:H3,r,SMALL(rng,SEQUENCE(COUNT(rng))),t,TRANSPOSE(r),SUM((r>t)*(MOD(r,t)=0)))
J7:J12J7=LET(rng,C2:H3,s,SEQUENCE(COUNT(rng)),r,SMALL(rng,s),t,TRANSPOSE(r),f,(MOD(r,t)=0)*(r>t),m,MMULT(f,s),FILTER(r,m))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:H3Expression=LET(rng,$C$2:$H$3,r,SMALL(rng,SEQUENCE(COUNT(rng))),OR((r<D2)*(MOD(D2,r)=0)))textNO
 
Upvote 0
eric, is it possible to find only the dividable numbers between the two rows?
like c2 against c3 and d3 and e3 and f3 and g3 and h3 and etc
but without the c2 against d2 and e2 and etc
sorry again, i meant counting only the dividable numbers between the two rows?
and for the example you gave the result should be 9
 
Upvote 0
There's probably a way. But first, how did you get the result of 9 for my example? What numbers specifically should be included in the count, and why?
 
Upvote 0
29-2-3-4-5-6
7-8-9-10-11-12

so, 12 divide by 2 and 3 and 4 and 6 = 4
plus
10 divide by 5 and 2 = 2
plus
9 by3 = 1
plus
8 by 4 and 2 =2
total = 9

11 and 7 and 29 don't divide by any of the above numbers

including always the larger number and checking if it's divide by any of the smaller one's with a remainder
but only from one row to another, not inside one row (which you already gave a solution) like 6 divide by 3
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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