Update cell based on a parent value

rf7clan

New Member
Joined
Jun 25, 2020
Messages
13
Office Version
  1. 2007
Platform
  1. Windows
Hello All! Let's say I have a spreadsheet that has 10 rows for a company (column A) and contains rows for 100 companies. In column B, there may be a fiscal year value but only in one row for a company. I want to update column B with that fiscal year value for all the rows for that company.

Simple example (all ABC Co. col B will be set to 2020 and all GHI Co. col B will be set to 2021):
A B
Row 1 ABC Co.
Row 2 ABC Co. 2020
Row 3 DEF Co.
Row 4 DEF Co.
Row 5 GHI Co. 2021
Row 6 GHI Co.
 
OK, let me know if the code works out for you.
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,215,232
Messages
6,123,759
Members
449,120
Latest member
Aa2

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