• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy Paste VBA

uday

Member
Hi All,

In the attached file there are two columns contain data which are column A and column B. I want to copy the same data from column A and B to column C , D.

I do not want put any "=A","=B" (link function) in column C,D. Column A,B data can be increase and decrease. It will only copy the data which are reflecting in column A and B.

I am trying to do it by finding last row data VBA coding but when its increase or decrease I can not able do the same,

ref.
Sub LastRow()
range("A2").Select
Activecell.end(xldown).select
End Sub

I want modify it.
 

Attachments

  • Copy Paste.xlsx
    7.9 KB · Views: 0
Deepak

The given coding is working like a charm. Now I want to filldown E column with a formula and it will be depends on data availability in c and D column.

The formula is {=CONCATENATE(C2, " ",D2)}

It could be enhance the mentioned script to the next level.
 
Deepak

The given coding is working like a charm. Now I want to filldown E column with a formula and it will be depends on data availability in c and D column.

The formula is {=CONCATENATE(C2, " ",D2)}

It could be enhance the mentioned script to the next level.

Hi,

I failed to understand why u used array in said formula!!

Check this...

Code:
Range("E2:E" & Range("A1").CurrentRegion.Rows.Count) = "=C2&"" ""&D2"
 
Hi Deepak,

I have one array formula"{=IF(MAX(IF(A3=$E$3:$E$17,$G$3:$G$17))-MIN(IF(A3=$E$3:$E$17,$G$3:$G$17))>=0.5,TRUE,FALSE)+NOT(AND(COUNTIF($A$3:$A$17,A3)=1,COUNTIF($A$3:A3,A3)=1))}" which required {} to work properly. But I am facing one challenge to fill down the formula in the same manner.

When I am trying to put the formula with {} it is taking as a text.
I really need some improvement in coding. Without array it wont work.

I have attached a new attached which contains the formula and the VBA coding.
 

Attachments

  • Consistency.xlsm
    23.3 KB · Views: 0
Back
Top