gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
This VBA even is copying the conditional formatting from ws1 to ws2. How can I copy…
- User
This VBA even is copying the conditional formatting from ws1 to ws2. How can I copy values only.
ws1.Range("A" & cell.Row & ":K" & cell.Row).Copy ws2.Range("A" & destRow).PasteSpecial Paste:=xlPasteValues
- Assistant
To copy values only from ws1 to ws2, you can directly assign the values of the range in ws1 to the range in ws2. Here's an example of how you can modify the code:
ws2.Range("A" & destRow & ":K" & destRow).Value = ws1.Range("A" & cell.Row & ":K" & cell.Row).ValueThis line of code will copy the values from the specified range in ws1 to the corresponding range in ws2 without copying the conditional formatting.