Excel VBA IF Copy and Paste Value Equals

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 if it equals the value 390.005-15 to column PartNum. Thanks for the help

1654701039777.png
 

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.
Welcome to the Board!

So, you want to copy the values of "390.005-15" over to the "PartNum" column? Is that correct?
If so, please tell us the column letters that the "PartNum" and "MaterialNum" columns are found in.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,215,426
Messages
6,124,828
Members
449,190
Latest member
rscraig11

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