Type Mismatch error

shallnotbe

New Member
Joined
Oct 27, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I am getting a type Mismatch error on the third line, The first 2 work correctly. The only difference is that line 3 has text in the cell vs a numerical value. I also tried .text instead of .value with no success. Can someone explain to me what I am doing wrong

RPTS.Range("A" & Targetrow).Value = A1.Range("A" & DU).Value
RPTS.Range("B" & Targetrow).Value = A1.Range("W" & DU).Value
RPTS.Range("C" * Targetrow).Value = A1.Range("X" & DU).Value

Mark
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi there

If you replace

VBA Code:
RPTS.Range("C" * Targetrow).Value = A1.Range("X" & DU).Value

with

VBA Code:
RPTS.Range("C" & Targetrow).Value = A1.Range("X" & DU).Value

what happens then...
 
Upvote 0
OMG, I am sorry to have wasted your time. I looked at that for so long and didn't see the typo.
 
Upvote 0
Lol... No need to apologise... Happens to me as well sometime... All needed is a fresh pair of eyes... Is it working now...
 
Upvote 0
Glad we could help and thanks for the feedback :cool:
 
Upvote 0

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

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