+ Reply to Thread
Results 1 to 4 of 4

Once value match then copy Sheet 1 Define cell & paste to another Sheet 2 Define cell

  1. #1
    Registered User
    Join Date
    02-13-2018
    Location
    MUMBAI
    MS-Off Ver
    2018
    Posts
    4

    Exclamation Once value match then copy Sheet 1 Define cell & paste to another Sheet 2 Define cell

    HI There,

    Need Urgent Help to Build a Code for one Work project workbook
    I need that once cell value Matched then Copy and paste the Cell value from one sheet to another
    Like in the attached file Sheet 1 Cell "D5" with matched with Sheet 2 range (A4:A7)(List of Name or EMail id ) then copy the value from Sheet 1 Cell ("C9", "E9","G9") a specific cell & paste to a specific cell In Sheet to with the same line where Sheet 1 D5 value matched
    Like Below Example
    Sheet 1 Cell value is "Rajesh"
    In Sheet 2 Once the value is matched then on the same line a specific cell ("B5","D5","F9") value should paste

    I already tried Below Code but unable to paste on require cells

    Sub findAndCopy()
    Dim foundCell As Range, sh1, sh2 As Worksheet

    'Set sheets
    Set sh1 = Sheets("Test-01")
    Set sh2 = Sheets("Test-02")

    'Find string in column C of Sheet2
    Set foundCell = sh2.Range("A2:A5").Find(sh1.Range("D5").Value, , xlValues, xlWhole)
    If Not foundCell Is Nothing Then 'If match cell is found
    sh1.Range("C9", "E9").Copy
    foundCell.PasteSpecial xlPasteValues
    foundCell.PasteSpecial xlPasteFormats

    Application.CutCopyMode = False
    Else
    Call MsgBox("Not found the match cell!", vbExclamation, "Finding String")
    End If
    End Sub
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,095

    Re: Once value match then copy Sheet 1 Define cell & paste to another Sheet 2 Define cell

    I am not able to open the file. I get a message asking me to sign in with my email and when I don't then I get another saying that I do not have permission to open.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    02-13-2018
    Location
    MUMBAI
    MS-Off Ver
    2018
    Posts
    4

    Re: Once value match then copy Sheet 1 Define cell & paste to another Sheet 2 Define cell

    Please find attached the same
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,095

    Re: Once value match then copy Sheet 1 Define cell & paste to another Sheet 2 Define cell

    Would a formula based solution be acceptable?
    On the Test-02 sheet is 123 supposed to be in cells A4:A5 or in B4:B5?
    Should there be values in F4:F5? And if not where does the 789 in cells G9 on the Test-01 sheet come from?

+ 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. Need to define a search or define instruction to extract parts of data from cell
    By Dawn Clark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2021, 02:45 AM
  2. Replies: 8
    Last Post: 02-20-2021, 01:57 PM
  3. [SOLVED] VBA - define print on other sheet by cell value
    By ISMI in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2018, 01:38 AM
  4. Replies: 0
    Last Post: 09-17-2017, 06:30 PM
  5. Different sheet refernce using a formula to define the cell reference
    By tritty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2013, 11:16 PM
  6. Replies: 7
    Last Post: 12-03-2012, 03:10 AM
  7. How to define a cell name and reference it in a differen sheet
    By shaunsul in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2011, 01:27 PM

Tags for this Thread

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