Overwrite a cell in another worksheet when the value gets updated

Nlhicks

Board Regular
Joined
Jan 8, 2021
Messages
244
Office Version
  1. 365
Platform
  1. Windows
This code does what I want it to do on the front sheet "Sheet1" however, what I really want is for it to take the "F8" value if not zero and update the spreadsheet "Sheet2".
If Range("F8").Value > 0 Then
Range("C8").Value = Range("F8").Value

The problem is, there are four separate criteria to meet in order to find the right cell modelled by this equation:
=INDEX(Sheet2!B:B,SMALL(IF(ISNUMBER((SEARCH(Sheet1!C3,Sheet2!J:J))*(SEARCH(Sheet1!C4,Sheet2!K:K))*(SEARCH(Sheet1!C5,Sheet2!L:L))*(SEARCH(F4,Sheet2!M:M))),MATCH(ROW(Sheet2!J:J),ROW(Sheet2!J:J)),""),ROWS(Sheet2!$A$1:$A$1)),COLUMNS(Sheet2!$A$1:A1))

How can I make Range ("C8") turn into the equation above so the appropriate cell on the appropriate spreadsheet will get changed? Once it does get changed then the visible sheet will show the change but the formula on the front sheet will stay and not get over written.

I keep getting this error

Method ‘Range’ of object ‘_Global’ failed

 

Attachments

  • Front page.PNG
    Front page.PNG
    24.8 KB · Views: 6

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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