SUMPRODUCT active link formula

Unexpc

Active Member
Joined
Nov 12, 2020
Messages
496
Office Version
  1. 2019
Platform
  1. Windows
Hi guys
i have sumproduct formula for counting two range of number, i want count active cells of formula that linked to another sheet...
=SUMPRODUCT((ISNUMBER(D:D))*(NOT(ISFORMULA(D:D)))+(ISNUMBER(G:G))*(NOT(ISFORMULA(G:G))))-SUMPRODUCT((ISNUMBER(D:D))*(NOT(ISFORMULA(D:D)))*(ISNUMBER(G:G))*(NOT(ISFORMULA(G:G))))
my link formula:
=IF(MOD(ROW()-6,34)=0,SUM($C$7:C7),IF(MOD(ROW()-7,34)=0,"بدهکار طلا",IF(IFERROR(INDIRECT(LOOKUP(2,1/(("Sheet!D"&ROW()-5-INT((ROW()-6)/34)-INT((ROW()-7)/34))<>""),("Sheet!D"&ROW()-5-INT((ROW()-6)/34)-INT((ROW()-7)/34)))),"")=0,"",IFERROR(INDIRECT(LOOKUP(2,1/(("Sheet!D"&ROW()-6-INT((ROW()-6)/34)-INT((ROW()-7)/34))<>""),("Sheet!D"&ROW()-5-INT((ROW()-6)/34)-INT((ROW()-7)/34)))),""))))
 
Could you show an example with a wrong result, the same as the one in post 13 with the coloured numbers?
sorry for i bad say, this what i want:
i have 2 sheet, Sheet and Print
in Sheet main data that some cells fill and some cells empty, and cells of Sheet linked to Print cells
i want count cells in column C in Print that just show data except text and sum formula
a point that is column F related to column C, so i want when two data in same row of this two column, count one value instead of two value
and for column D and G like this two previous column
i hope i better say before :)
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I think that I understand now, is this what you need? I've added some extra numbers into columns F and G to test the formula.

Note that the end of the data is identified by the word "SUM" in column A, not by the formulas in the other cells.
autoclose test.xlsm
ABCDEFGH
1
2
3Count A5Count B7
4212121212121
5
6
7TEXTTEXTTEXTTEXTTEXTTEXTTEXTTEXT
82121211212110
92121212-2100
102121213212110
1121212143455220
122121215-76-210
1321212165-16330
142121217-2-180
152121218-8-260
1621212195-210
17SUM86-10700
Sheet7
Cell Formulas
RangeFormula
E3E3=SUMPRODUCT(SIGN((C8:INDEX(C:C,MATCH("SUM",A:A,0)-1)<>"")+((F8:INDEX(F:F,MATCH("SUM",A:A,0)-1)<>""))))
H3H3=SUMPRODUCT(SIGN((D8:INDEX(D:D,MATCH("SUM",A:A,0)-1)<>"")+((G8:INDEX(G:G,MATCH("SUM",A:A,0)-1)<>""))))
 
Upvote 0
Solution
I think that I understand now, is this what you need? I've added some extra numbers into columns F and G to test the formula.

Note that the end of the data is identified by the word "SUM" in column A, not by the formulas in the other cells.
autoclose test.xlsm
ABCDEFGH
1
2
3Count A5Count B7
4212121212121
5
6
7TEXTTEXTTEXTTEXTTEXTTEXTTEXTTEXT
82121211212110
92121212-2100
102121213212110
1121212143455220
122121215-76-210
1321212165-16330
142121217-2-180
152121218-8-260
1621212195-210
17SUM86-10700
Sheet7
Cell Formulas
RangeFormula
E3E3=SUMPRODUCT(SIGN((C8:INDEX(C:C,MATCH("SUM",A:A,0)-1)<>"")+((F8:INDEX(F:F,MATCH("SUM",A:A,0)-1)<>""))))
H3H3=SUMPRODUCT(SIGN((D8:INDEX(D:D,MATCH("SUM",A:A,0)-1)<>"")+((G8:INDEX(G:G,MATCH("SUM",A:A,0)-1)<>""))))
yes, that is correct, that is i want but in next pages not count
 
Upvote 0
but in next pages not count
I don't get what you mean. As I asked earlier, if it is not what you want, please post a small example where it is wrong and show me what it should be with highlighting.
 
Upvote 0
i mean, this just count until cell that written SUM, if i right, i want count until excel cells end
 
Upvote 0
As long as there is nothing else in column A to be excluded,
Count A
Excel Formula:
=SUM(COUNTIFS(A8:INDEX(A:A,MATCH("zzz",A:A)),"<>SUM",C8:INDEX(C:C,MATCH("zzz",A:A)),{"","<>","<>"},F8:INDEX(F:F,MATCH("zzz",A:A)),{"<>","<>",""}))
Count B
Excel Formula:
=SUM(COUNTIFS(A8:INDEX(A:A,MATCH("zzz",A:A)),"<>SUM",D8:INDEX(D:D,MATCH("zzz",A:A)),{"","<>","<>"},G8:INDEX(G:G,MATCH("zzz",A:A)),{"<>","<>",""}))
 
Upvote 0
As long as there is nothing else in column A to be excluded,
Count A
Excel Formula:
=SUM(COUNTIFS(A8:INDEX(A:A,MATCH("zzz",A:A)),"<>SUM",C8:INDEX(C:C,MATCH("zzz",A:A)),{"","<>","<>"},F8:INDEX(F:F,MATCH("zzz",A:A)),{"<>","<>",""}))
Count B
Excel Formula:
=SUM(COUNTIFS(A8:INDEX(A:A,MATCH("zzz",A:A)),"<>SUM",D8:INDEX(D:D,MATCH("zzz",A:A)),{"","<>","<>"},G8:INDEX(G:G,MATCH("zzz",A:A)),{"<>","<>",""}))
it counts formula, :(
as far as i know, i say just count active cell, what thing i want, i want all data just show not empty (a example i send before) except SUM Value and other text and nothing, just linked cells show a data, thats it
 
Upvote 0
i say just count active cell,
I've already pointed out in post 2 that what you said there means nothing, there is only ever one active cell, no more, no less.
What you want is not always possible, especially in the way that you want it. This means that we have to try other things to see if they work.

See if this one gives you the correct result. I've set it to look at 10,000 rows as other methods to make it more efficient by looking at the actual data range are clearly not working.

Excel Formula:
=SUMPRODUCT((A8:A10000<>"SUM")*(((C8:C10000<>"")+(F8:F10000<>""))>0))
 
Upvote 0

Forum statistics

Threads
1,215,495
Messages
6,125,149
Members
449,208
Latest member
emmac

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