Romano_odK
Active Member
- Joined
- Jun 4, 2020
- Messages
- 380
- Office Version
- 365
- Platform
- 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.
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
5 | Artikelcode | Zoekcode | Omschrijving | Status | Startdatum | Verkoopprijs | Verkoopprijs nieuw | Vkp bedrag | ||
6 | 100000 | 8712759037825 | Vito Glaserfix 111 6x2 mm wit - 10x25 m | A | 24/09/2019 | 50,00 | 20,00 | 20,00 | ||
7 | 100001 | 8712759037832 | Vito Glaserfix 111 6x2 mm zwart - 10x25 m | A | 24/09/2019 | 60,00 | ||||
8 | 100002 | 8712759037849 | Vito Glaserfix 111 6x3 mm wit - 10x25 m | A | 24/09/2019 | 70,00 | 10,00 | 10,00 | ||
9 | 100003 | 8712759037856 | Vito Glaserfix 111 6x3 mm zwart - 10x25 m | A | 24/09/2019 | 80,00 | ||||
10 | 100004 | 8712759037863 | Vito Glaserfix 111 6x4 mm wit - 10x25 m | A | 24/09/2019 | 90,00 | 60,00 | 60,00 | ||
Items |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G6:G10 | G6 | =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 | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
C6:C10214 | Expression | =LEN(C6)>60 | text | NO |
B6:B10214 | Cell Value | duplicates | text | NO |
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