Overwrite a cell in another worksheet when the value gets updated

Nlhicks

Active Member
Joined
Jan 8, 2021
Messages
264
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: 7

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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