(VBA) Search and find certain text in a column, add the number from the neighboring column to the end of the text

zack8576

New Member
Joined
Dec 27, 2021
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Hello, I am new to this forum, and new to VBA.
I need to write a VBA script that can search column K and find text "C BOX(6"WALL), and add the number that is located in column L on the same row to the end of the text.
How can I do this? Any help is greatly appreciated !

Untitled.png
 

zack8576

New Member
Joined
Dec 27, 2021
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Option Explicit is a habit you should get into - it forces you to declare all variables you use throughout your code. This helps avoid many errors. To demonstrate, using the code in post #5, remove the
VBA Code:
c as Range
bit and try running it again.
Wow, so when I use Option Explicit, and a variable is not define, VBA actually tells me that this is not defined. that is awesome, so it would be a good practice to have this at the beginning of ALL the macros?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

kevin9999

Board Regular
Joined
Aug 28, 2020
Messages
129
Office Version
  1. 365
Platform
  1. Windows
Wow, so when I use Option Explicit, and a variable is not define, VBA actually tells me that this is not defined. that is awesome, so it would be a good practice to have this at the beginning of ALL the macros?
Absolutely.
 

kevin9999

Board Regular
Joined
Aug 28, 2020
Messages
129
Office Version
  1. 365
Platform
  1. Windows
You're welcome Zack, and thanks for the feedback :)
 

zack8576

New Member
Joined
Dec 27, 2021
Messages
41
Office Version
  1. 365
Platform
  1. Windows
You're welcome Zack, and thanks for the feedback :)
Kevin you have no idea how much I appreciate your help.. Your skill in VBA is very impressive
I have one more questions posted below, which is the last VBA hurdle I need to clear on this company project
With your tremendous knowledge in VBA, you might know the answer to this one too...

 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,491
Messages
5,764,679
Members
425,229
Latest member
Rashid mahmood

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
Top