• 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.

VBA Help

sa.1985

Member
i want to get data in sheet3 of sheet2

Please modify below coding


Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Range("sheet2")("A1:A25")) Is Nothing Then Exit Sub

Application.EnableEvents = True

If Range("sheet2")("A1") <> "" Then

Range("sheet3")("B1:B25") = Range("sheet2")("A1:A25").Value

End If

Application.EnableEvents = True

End Sub
 
Hi, sa.1985!


Assuming lots of things, try this:

-----

[pre]
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("sheet2!A1:A25")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Range("sheet2!A1") <> "" Then
Worksheets("sheet3").Range("B1:B25") = Range("A1:A25").Value
End If
Application.EnableEvents = True
End Sub
[/pre]
-----


I only corrected syntax, enable events setting and indentation. Should have I tested if it worked fine? I assume it did and that has only been wrongly modified. I don't know if the switch of one column (from A in sheet2 to B in sheet3) is right or not as there is no information provided.


In the future, I strongly recommend you to upload a sample workbook as your description of the problem and of what you've done towards getting a solution are not clear enough.


Regards!
 
Thanks SirJB7...........


I assume that ........


first condition : sheet2's cell B1 is "1" then sheet2's A1 cell's data transfer in sheet 3 in A1,

same condition is here

second condition : sheet2's cell C1 is "2" then Sheet2's A2 cell's data transfer in sheet 4 in cell A2


is this possible ?
 
Dear Chandoo !


Please find the link . need vba help please

your concept will clear after see file .


I want to here for modify above coding

if I enter id no 1 in this data entry sheet then its data (a2:f4) comes in sheet name 1

if i enter id no 2 in this data entry sheet then its data (a5:f7) comes in sheet name 2

if i enter id no 3 in this data entry sheet then its data (a8:f11) comes in sheet name 3


https://docs.google.com/spreadsheet/ccc?key=0AqVY6rBw3NuBdGdSSVJLbUQ1cVFScXFVTnU0d3ozZ2c
 
Sa.1985


Can you please start new posts for new questions

It makes answering and searching posts so much easier


I think what you want is to put In C2:

Code:
=INDIRECT("'"&$B2&"'"&"!"&MID(ADDRESS(ROW(),COLUMN()),2,1)&ROW())


Copy across and then down
 
Back
Top