AUTO COPY AND PASTE

Brass Contributor

Hi all i need help with some vba or micro 

 

so i just need to copy one cell to another 

 lets just say i need cell to be paste in E3 

but the list is in row F it could be anything from 1 up to 100 line i need something that can auto detect if the cell have anything in it and copy one buy one to E3 cell 

 

11 Replies
It's kind of hypothetical question, please share some sample data, and be specific about, "i need something that can auto detect if the cell have anything in it and copy one buy one to E3 cell "!!

@Rajesh_Sinha 

 

something like this 

So when i paste all the  data in H like starting from one and down ( 1-2-3-4-5-6-7-8 are like example )

it would start copying from H2 down 

copy one cell at the time to F3 so i can print it as son **bleep** its detect the call F3 have change 

I need to print these labels 

i dint know how many i get every  time so need something that would auto detect and would not copy empty cells 

 

Hope this helps 

@Rajesh_Sinha 

 

Hi

 

So do you have any idea how i can get this working ?

You mean to say that you want to copy data from H2:H48 into F3 downwards ,, and this you want to automate,, like as soon you fill F3 with H2, then you are expecting excel to fill the sequence or you yourself wanna fill it ?

@beikme 

 

Check the column F in attached sheet, find the formula in cell F4 downwards,, I hope that you are looking for this.

 

In cell F3, you need to enter number smaller/prior than H3, like is 1 then 0. This will copy automatically in H4:H54, this may vary depends on the set of numbers to want to get.

 

Remember cell H4:H54  has formula ,, need to be handled carefully.

@Rajesh_Sinha 

 

Hi 

No that's not it 

i need it that when I copy data in starting from H2 it would automatically  copy and paste the cell to F3

ind the data i past in there is random numbers 

and it could be 5 lines of data like from H2 to H7 or it could be 100 lines off data like from H2 to H102 

i need excel to detect if and copy the cells only if they have data in them 

and i need it to be done one cell at the time 

so i can use my print vba to print the label every time f3 have bin updated 

@Rajesh_Sinha 

 

I'm using this vba to print 

 

 

Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range

Set KeyCells = Range("F3")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then

ActiveSheet.PrintOut


End If
End Sub

 

I'm confused,, since ActiveSheet.PrintOut prints the Active sheet, I mean the entire sheet, are you sure that you want this only or something else !!

@Rajesh_Sinha 

i have set print area so it would only print part that i need 

This VBA code will print the current sheet/part of it what so every when cell F3 has no value,, then could you please write me,,, how you get value in F3,, from Keyboard or through formula,, if using formula then using which cell to copy in F3 !

@Rajesh_Sinha 

 

I dont have a formula i need a vba that will detect  if the cell is empty or if there is something there and if there is something there it would copy to f3