Help with VBA

Russk68

Well-known Member
Joined
May 1, 2006
Messages
589
Office Version
  1. 365
Platform
  1. MacOS
Hi All
I need an automated method of replacing a formula when a change in a specific cell is made. I have been using a VBA method of double clicking in a cell to replace a formula. I have many layouts like this that consist of 12 rows. The next layout would be 14 thru 25. Column A and B are Index,Match formulas.
Sometimes column B needs to be overwritten. Lets say B5 is overwritten.
Sometimes the truck # might change. If it does, I need B5:B12 to update but B5 has no formula. I would then double click in B5 and the formula would be replaced. This is fast but it's not fail safe.
Is it possible to have the formulas in B5:B12 replaced with VBA when A2 changes? And the repeat for each layout.

B5 Formula: =IFERROR(INDEX('Patch By UNIVERSE'!$BH$3:$BH$5000,MATCH(AY5,'Patch By UNIVERSE'!$BG$3:$BG$5000,0)),"")

This would be awesome!

Thank you!

A
2Truck 1


AB
4LabelItem
5Crate 1Apple
6Crate 2Orange
7
8
19
10
11
12
 
The problem with using calculate is that it can change some manual entries to formulas prematurely because almost any change will trigger the calculate event. I cannot think of a way to confine the event to just certain columns on specific sheets.
I see
I will have to rethink my layout.

Thank you for your time!
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,216,066
Messages
6,128,577
Members
449,459
Latest member
20rayallen

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