Search for a value in a column, then modify all the cells contain this value by adding a number to the end

zack8576

Active Member
Joined
Dec 27, 2021
Messages
271
Office Version
  1. 365
Platform
  1. Windows
I am fairly new to VBA. I need to create a macro that searches the entire column K for keywords " C Box", for any cell in this column that contains these keywords, I need to add a numerical value to the end of the text (this numerical is always in the same row as the cell that contains the keywords, but in column L)

for example:
K L
Row 43 C Box 14"
Row 55 C Box 28"

after run the macro, the text in column K becomes C Box 14" on row 43, and C Box 28" on row 55.

Any help would be greatly appreciated !
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Image uploaded, the column I am searching is K, which contains all the text values; and all the numerical values are in column L
 

Attachments

  • Capture.PNG
    Capture.PNG
    44.9 KB · Views: 9
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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