$ every 6th row * # every 6th row base on a criteria every 6th row

ozbeachbum

Board Regular
Joined
Jun 3, 2015
Messages
233
Office Version
  1. 2021
Platform
  1. Windows
Hi all,
Any help with the following would be greatly appreciated.

$ every 6th row * # every 6th row base on a criteria every 6th row
D70 is the first cell containing criteria (Criteria is >0) Last cell D328
Q73 is the first cell containing $ Last cell Q331
Q72 is the first cell containing # Last cell Q330

I need each $ * # if >0 and the results add together.
EG:
D70 >0 Q73 $10 * Q72 5 = $50
D76 >0 Q79 $15 * Q78 2 = $30
D82 <0 Q85 $12 * Q84 2 = $00
The result would be $80

The cell with the result in it is in one workbook and the data cells in another.
The cells between the cells with the required data, may contain; blanks; zeros; formulae or other $ and #

Cheers,
Dave.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
May i suggest you post your data using the Mr. Excel xl2bb add in (link below) which allows you to share you data as a mini work sheet? In case you cannot do that, then please post your data as a table. Posting an image to completely recreate your scenario can have typographical or understanding errors which will give you an incorrect solution and waste the forum''s time.

Please help the forum help you.

Thanks in advance.
 
Upvote 0
I have done this in a single sheet but if I have understood what you have/want then the formula would easily translate to multiple worksheets/workbooks.
I have highlighted the mentioned cells for easy viewing/checking for myself.
Wasn't quite sure of the meaning regarding column D so I have done two scenarios for that. Hopefully one of them is what you meant.

23 11 25.xlsm
DQRS
70880
71
7205
73-810
743
755
7623
772
78hjg2
7915
80ghfh
81-5
82-53
83-3
842
8512
Calc 1
Cell Formulas
RangeFormula
S70S70=LET(s,SEQUENCE((ROW(D328)-ROW(D70)+1)/6,,,6),SUM((INDEX(D70:D328,s)>0)*INDEX(Q70:Q328,s+2)*INDEX(Q70:Q328,s+3)))


23 11 25.xlsm
DQRS
70>080
71
7205
73-810
743
755
76>03
772
78hjg2
7915
80ghfh
81-5
82<03
83-3
842
8512
Calc 2
Cell Formulas
RangeFormula
S70S70=LET(s,SEQUENCE((ROW(D328)-ROW(D70)+1)/6,,,6),SUM((INDEX(D70:D328,s)=">0")*INDEX(Q70:Q328,s+2)*INDEX(Q70:Q328,s+3)))
 
Upvote 0
May i suggest you post your data using the Mr. Excel xl2bb add in (link below) which allows you to share you data as a mini work sheet? In case you cannot do that, then please post your data as a table. Posting an image to completely recreate your scenario can have typographical or understanding errors which will give you an incorrect solution and waste the forum''s time.

Please help the forum help you.

Thanks in advance.
Hi awoohaw,
Thanks for your suggestion.
I would love to be able to do so, but ever since upgrading to office 21 it does not work.
I have to this date received no reply that has been able to assist, should you know of a solution I would be happy to hear it.
Cheers,
Dave.
 
Upvote 0
I have to this date received no reply that has been able to assist,
So, is my sample data nothing like yours?

I would love to be able to do so, but ever since upgrading to office 21 it does not work.
Have you tried uninstalling and reinstalling XL2BB?
Failing that, just copy paste the small col B section & tell us the range like this

This is B70:B85 from my sample data
8​
0​
-8​
3​
2​
hjg
ghfh
-5​
-3​

and do the same for column Q
 
Upvote 0
I have done this in a single sheet but if I have understood what you have/want then the formula would easily translate to multiple worksheets/workbooks.
I have highlighted the mentioned cells for easy viewing/checking for myself.
Wasn't quite sure of the meaning regarding column D so I have done two scenarios for that. Hopefully one of them is what you meant.

23 11 25.xlsm
DQRS
70880
71
7205
73-810
743
755
7623
772
78hjg2
7915
80ghfh
81-5
82-53
83-3
842
8512
Calc 1
Cell Formulas
RangeFormula
S70S70=LET(s,SEQUENCE((ROW(D328)-ROW(D70)+1)/6,,,6),SUM((INDEX(D70:D328,s)>0)*INDEX(Q70:Q328,s+2)*INDEX(Q70:Q328,s+3)))


23 11 25.xlsm
DQRS
70>080
71
7205
73-810
743
755
76>03
772
78hjg2
7915
80ghfh
81-5
82<03
83-3
842
8512
Calc 2
Cell Formulas
RangeFormula
S70S70=LET(s,SEQUENCE((ROW(D328)-ROW(D70)+1)/6,,,6),SUM((INDEX(D70:D328,s)=">0")*INDEX(Q70:Q328,s+2)*INDEX(Q70:Q328,s+3)))
 
Upvote 0
Hi Peter,
Thanks for the formula, I tested it in relation to it referencing the cells in another workbook and was not getting the correct answer. Could be something I did incorrectly, I will have to check and get back to you if I can't work it out.
I then thought I would use it referencing cells in the same workbook and it worked, the I added amounts to cells continuing on and it did not calculate those.
I have attached a print screen to assist.
Thanks again for all you assistance.
Cheers,
Dave.
231126 6th row qty x $ +.jpg
 
Upvote 0
So, is my sample data nothing like yours?


Have you tried uninstalling and reinstalling XL2BB?
Failing that, just copy paste the small col B section & tell us the range like this

This is B70:B85 from my sample data
8​
0​
-8​
3​
2​
hjg
ghfh
-5​
-3​

and do the same for column Q
Hi,
Thanks for your time and patience.
Re uninstalling and reinstalling yes done, no success.
It copies to the clipboard, just won't attach to the post.
Peter has come back with a formula, which I have replied to, if you are able to view that it may assist, if not let me know and I will send to you.
Thanks again.
 
Upvote 0
It copies to the clipboard, just won't attach to the post.
Try enabling this option in the XL2BB ribbon menu before you click 'Mini Sheet'

1700955911791.png



I added amounts to cells continuing on and it did not calculate those.
In your first 3 groups of 6 rows, the values in column Q are in the 3rd & 4th rows of the group.
In all the other groups in your image, the values in column Q are in the 4th & 5th rows of the group. Was that a mistake? I had assumed a regular pattern.

If I move those value to rows 3 & 4 of each group then I get the 160 that you expected.

ozbeachbum.xlsm
DQRS
7011160
7122
72353
734104
7455
756
7611
7722
78323
794154
8055
816
8201
8302
84023
850124
8605
876
8811
8922
903103
91454
9255
936
9411
9522
96323
974154
9855
996
10001
10102
102023
1030124
10405
1056
Calc 3 (2)
Cell Formulas
RangeFormula
S70S70=LET(s,SEQUENCE((ROW(D328)-ROW(D70)+1)/6,,,6),SUM((INDEX(D70:D328,s)>0)*INDEX(Q70:Q328,s+2)*INDEX(Q70:Q328,s+3)))
 
Last edited:
Upvote 0
Solution
Thanks Peter,
Quite correct my mistake.
I have also worked out that my check for the formula working in relation referencing the other workbook had to do with blanks and zeros in the formula I was using to check for the amount, fixed that and now I get the correct answer.
As always thank you so much.
Cheers.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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