find Max value and copy paste add value

bigMe

New Member
Joined
Mar 20, 2023
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
dear friends,
please help me on this matter.
i have 2 sheets, in sheet1 contain the Max value address and a number, in sheet2 a column contain several number and a column for result
i need to do a VBA calculation in sheet2 to the MAX value so the result equal with value in sheet1 using copy special paste add, thank you.
note : there are 2 condition depend on the value on column D in sheet1
Capture.JPG
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi, see the linked file for a possible solution...

The formulas used in the table...
Sheet1a!B2: =ADDRESS(MATCH(MAX(Sheet2a!B2:B8),Sheet2a!B2:B8,0)+1,2,1,,"Sheet2a")
Sheet1a!D2: =Sheet2a!B9-C2
Sheet1b!B2: =ADDRESS(MATCH(MAX(Sheet2b!B2:B8),Sheet2a!B2:B8,0)+1,2,1,,"Sheet2b")
Sheet1b!D2: =Sheet2b!B9-C2
Sheet2a!C2: =IF(AND(MAX(B$2:B$8)=B2,COUNTIF(B$2:B2,B2)=1),B2-Sheet1a!D$2,B2) (Range: C2:C8)
Sheet2b!C2: =IF(AND(MAX(B$2:B$8)=B2,COUNTIF(B$2:B2,B2)=1),B2-Sheet1b!D$2,B2) (Range: C2:C8)

FindMax.xlsx

Sheet1a.png


Sheet1b.png


Sheet2a.png


Sheet2b.png
 
Upvote 0
dear fjns,
thank you very much for the solutions.

regards,
bigMe
 
Upvote 0
Dear Friend,
I am very glad that the formulas work.
If I have enough knowledge, I am happy to help at any time.
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

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