type mismatch: runtime error 13 vba

rathore

New Member
Joined
Jun 30, 2010
Messages
2
Hi,
i am new to VBA
I am simply trying to add the rows in 2 colums into a rd column. i wrote

columns(3).value= columns(1).value+ columns(2).value

but it gives runtime error 13.
Any help on this.....please reply soon....gotta make this work till tomorrow!!

thanx in advance.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Maybe

Code:
Sub a_test()
Lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = Lr To 1 Step -1
Range("C" & i) = Range("A" & i) + Range("B" & i)
Next i
End Sub
 
Upvote 0
thanx...but i cant use this.
yeah using loop i coud do that, but the problem is that i have 2 sets of 6 columns each of which are to be added to every other column. so if i use iteration, it take the program arnd 10 min. to calculate the result. Also i cannot use named reference as i have to use loops. So i have to use index notation.
See if u can help me with that.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,236
Members
448,555
Latest member
RobertJones1986

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