Excel calculation

ashani

Active Member
Joined
Mar 14, 2020
Messages
347
Office Version
  1. 365
Platform
  1. Windows
Hi experts,

I wonder if someone could please guide me - I'm trying to get percentage from the given formula for different Sellers but when I copy it Excel change the cell value to right next to the first one, however I want excel to work out automatically (leave 3 columns and start from 4th columns and so on - Week wise) I have screenshot the problem, I will really appreciate if you could please guide me either through simple formula or via VBA.

Thank you

1678990521806.png
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try this:
Excel Formula:
=IFERROR((OFFSET($H5,0,(COLUMN(A1)*4)-4,1,1)-OFFSET($J5,0,(COLUMN(A1)*4)-4,1,1))/OFFSET($K5,0,(COLUMN(A1)*4)-4,1,1),0)
 
Upvote 0
Another option
Excel Formula:
=LET(w,WRAPROWS(H4:W4,4),TOROW(IFERROR((INDEX(w,,1)-INDEX(w,,3))/INDEX(w,,4),0)))
 
Upvote 0
Try This
Book1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1
2Formula(PR-DT)/(TS)
3Week 1Week 2Week 3Week 4Week 1Week 1Week 1Week 1Week 2Week 2Week 2Week 2Week 3Week 3Week 3Week 3Week 4Week 4Week 4Week 4
4PRPSDTTSPRPSDTTSPRPSDTTSPRPSDTTS
5Seller 1100%#DIV/0!-100%25%1001000000222114
6Seller 2100%#DIV/0!0%-100%1001000010120011
7Seller 3100%100%100%100%1001100110011001
8Seller 433%#DIV/0!#DIV/0!#DIV/0!2013000000000000
9Seller 50%100%0%50%1012200210123014
10Seller 6100%100%#DIV/0!100%3003200200002002
11Seller 7100%33%#DIV/0!0%1001201300000101
12Seller 8100%#DIV/0!100%-50%2002000010010112
13
Sheet2
Cell Formulas
RangeFormula
C5C5=LET(pr,INDEX($H5:$W5,MATCH(C$3&"PR",$H$3:$W$3&$H$4:$W$4,0)),dt,INDEX($H5:$W5,MATCH($C$3&"DT",$H$3:$W$3&$H$4:$W$4,0)),ts,INDEX($H5:$W5,MATCH($C$3&"TS",$H$3:$W$3&$H$4:$W$4,0)),(pr-dt)/ts)
D5:D12D5=LET(pr,INDEX($H5:$W5,MATCH(D$3&"PR",$H$3:$W$3&$H$4:$W$4,0)),dt,INDEX($H5:$W5,MATCH($D$3&"DT",$H$3:$W$3&$H$4:$W$4,0)),ts,INDEX($H5:$W5,MATCH($D$3&"TS",$H$3:$W$3&$H$4:$W$4,0)),(pr-dt)/ts)
E5:E12E5=LET(pr,INDEX($H5:$W5,MATCH(E$3&"PR",$H$3:$W$3&$H$4:$W$4,0)),dt,INDEX($H5:$W5,MATCH($E$3&"DT",$H$3:$W$3&$H$4:$W$4,0)),ts,INDEX($H5:$W5,MATCH($E$3&"TS",$H$3:$W$3&$H$4:$W$4,0)),(pr-dt)/ts)
F5:F12F5=LET(pr,INDEX($H5:$W5,MATCH(F$3&"PR",$H$3:$W$3&$H$4:$W$4,0)),dt,INDEX($H5:$W5,MATCH($F$3&"DT",$H$3:$W$3&$H$4:$W$4,0)),ts,INDEX($H5:$W5,MATCH($F$3&"TS",$H$3:$W$3&$H$4:$W$4,0)),(pr-dt)/ts)
C6:C12C6=LET(pr,INDEX(H6:W6,MATCH(C$3&"PR",$H$3:$W$3&$H$4:$W$4,0)),dt,INDEX(H6:W6,MATCH($C$3&"DT",$H$3:$W$3&$H$4:$W$4,0)),ts,INDEX(H6:W6,MATCH($C$3&"TS",$H$3:$W$3&$H$4:$W$4,0)),(pr-dt)/ts)
 
Upvote 0
Fluff.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
1
2Formula(PR-DT)/(TS)Week 1Week 1Week 1Week 1Week 2Week 2Week 2Week 2Week 3Week 3Week 3Week 3Week 4Week 4Week 4Week 4
3Week 1Week 2Week 3Week 4PRPSDTTSPRPSDTTSPRPSDTTSPRPSDTTS
4Seller 1100%0%-100%25%1001000000222114
5Seller 2100%0%0%-100%1001000010120011
6Seller 3100%100%100%100%1001100110011001
7Seller 433%0%0%0%2013000000000000
8Seller 50%100%0%50%1012200210123014
9Seller 6100%100%0%100%3003200200002002
10Seller 7100%33%0%0%1001201300000101
11Seller 8100%0%100%-50%2002000010010112
Lists
Cell Formulas
RangeFormula
C4:F11C4=LET(w,WRAPROWS(H4:W4,4),TOROW(IFERROR((INDEX(w,,1)-INDEX(w,,3))/INDEX(w,,4),0)))
Dynamic array formulas.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
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