Excel VBA - Copy if value equals "X" to another column in same row

falascot

New Member
Joined
Jun 8, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
IN VBA, I'm trying to copy the value in column MaterialNum (column "P") if it equals the value 390.005-15, the value is copied to (column "C") Part# in the same row. It will overwrite the value in this case of 390.005. The current table is approximately 65,000 rows, but in most cases the value of 390.005-15 in column "P" maybe less than 20 rows.

I need to keep looping through the spread sheet until it's finds all the values.

This information is being pulled from a SQL table for manufacturing and it refreshes every 15 minutes

On the image, I hid some of the columns so I could show the two working columns that I have identified. Column "C" and column "P".

1655753458365.png
 
You're welcome & thanks for the feedback.
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

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