Copy the values but not overwrite when its not filled

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

This is a part of a sheet that updates my items, prices etc. Now what I would want is when I put a value in column G "Verkoopprijs nieuw" it will overwrite the values in column F but not empty the values that are not suppose to be overwritten when there is not a new price in the column G. I got some code for copying but that overwrite the values with blanks instead of leaving them alone. Would it then also be possible the make the values bold that are overwritten?

Thank you for time and have a great day.

Artikelen beheren XML 5.08.xlsm
ABCDEFGH
5ArtikelcodeZoekcodeOmschrijvingStatusStartdatumVerkoopprijsVerkoopprijs nieuwVkp bedrag
61000008712759037825Vito Glaserfix 111 6x2 mm wit - 10x25 mA24/09/201950,0020,0020,00
71000018712759037832Vito Glaserfix 111 6x2 mm zwart - 10x25 mA24/09/201960,00 
81000028712759037849Vito Glaserfix 111 6x3 mm wit - 10x25 mA24/09/201970,0010,0010,00
91000038712759037856Vito Glaserfix 111 6x3 mm zwart - 10x25 mA24/09/201980,00 
101000048712759037863Vito Glaserfix 111 6x4 mm wit - 10x25 mA24/09/201990,0060,0060,00
Items
Cell Formulas
RangeFormula
G6:G10G6=IFERROR(IFS(K6>0,M6/(1-K6),J6>0,M6*(1*J6)+M6,I6>0,F6*(1*I6)+F6,H6>0,H6),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C6:C10214Expression=LEN(C6)>60textNO
B6:B10214Cell ValueduplicatestextNO



VBA Code:
Private Sub CopyToVerkoopprijs_Click()
With Sheets("Items").ListObjects("ItemsImport")
   .ListColumns(7).DataBodyRange.Copy
   .ListColumns(6).DataBodyRange.PasteSpecial xlPasteValues, , True
   Application.CutCopyMode = False
End With
End Sub
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

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