+ Reply to Thread
Results 1 to 2 of 2

Data transfer between sheets with VBA

  1. #1
    Registered User
    Join Date
    08-24-2016
    Location
    İstanbul, Turkey
    MS-Off Ver
    2007
    Posts
    1

    Data transfer between sheets with VBA

    Hi Everyone,

    I have a problem with writing a macro code in Excel about data transfer between pages. I have a file that contains different features of 4 different products. I would like to compare those products in a seperate sheet, also I want this features to change according to a drop-down list.
    For example in sheet 3 and 4 there are info about 2 different car companies. I want to compare their products in sheet 2 according to the horse power (horse power will be in the ddl.) So, when I change the horse power I want the data I get from Sheets 3 and 4 to change.

    I have tried a couple things myself too. I managed to get the data from 1 sheet, but could not expand it. Also when I change the ddl value, the data of prev. ddl value's do not disappear. New one's came on top of it. So how is it possible to do this? How can i include all four sheets for the comparison? And remove the prev. values from the sheet when I change the ddl values.

    I am really new at this Excel and Vba stuff. I am also posting the code I've been working on. Please can you help me? I am really under stress about this file, it would be great if one you guys could help me to fix the code.

    [#]Code:
    Sub test()

    Dim aa As String
    Dim i, j As Integer
    aa = Sayfa1.Cells(1, 1)

    i = 4
    j = 2

    Do While Worksheets(aa).Cells(i, 8) <> ""


    If Worksheets(aa).Range("h" & i).Value = Sayfa1.Cells(1, 5) Then
    Worksheets(aa).Range("b" & i & ":" & "x" & i).Copy
    Sayfa2.Range("a" & j & ":" & "o" & j).PasteSpecial
    j = j + 1
    End If

    i = i + 1

    Loop

    End Sub
    [#]

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Data transfer between sheets with VBA

    See rule 3 of the forum rules below

    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    Please Login or Register  to view this content.
    ... and appear like this when posted:



    copy to clipboard
    your code here ...
    and here ...
    and here
    You can also type the code tags in manually if you prefer. For more information about these and other tags, click here.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Data Transfer Among Sheets
    By Ray Park in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2013, 12:31 PM
  2. data transfer between sheets
    By MikieD in forum Excel General
    Replies: 9
    Last Post: 03-24-2013, 06:27 PM
  3. Transfer Data between sheets
    By ryanb4614 in forum Excel General
    Replies: 3
    Last Post: 07-21-2012, 11:25 PM
  4. [SOLVED] VBA. One workbook, 9 sheets, how to transfer data from all sheets to one sheet?
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-08-2012, 01:28 PM
  5. Transfer data between sheets
    By billdata in forum Excel General
    Replies: 1
    Last Post: 02-17-2009, 03:21 AM
  6. Data transfer between sheets?
    By Sephiran in forum Excel General
    Replies: 5
    Last Post: 02-15-2009, 03:28 PM
  7. [SOLVED] transfer data between sheets
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2005, 06:35 AM
  8. transfer data in excel between sheets
    By Data Transfer betwen Excel Sheets in forum Excel General
    Replies: 1
    Last Post: 06-20-2005, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1