+ Reply to Thread
Results 1 to 4 of 4

VBA code to copy a part of cell value and assign the same to the records present below

  1. #1
    Registered User
    Join Date
    06-20-2015
    Location
    Chennai, India
    MS-Off Ver
    2010
    Posts
    59

    VBA code to copy a part of cell value and assign the same to the records present below

    Dear All,

    I am attaching an excel with passenger details. I need the VBA code to fill the expected result column based on the cell value "Accommodation: Appartementen Nicholas (SKISNICH)" for each block of the bookings... This code will differ for each block of booking numbers... Hence we have to assign this code for each block based on the value available just before the 'Booking' cell [i.e. for first block ROW 7 to 17 = col J should be 'CHARSKIA' {this val avl in cell A6} || for second block ROW 24 to 26 = col J should be 'KLOSMARG'{this val avl in cell A23}, we have to continue until the end of last booking.]

    I have attached the source file with the expected result highlighted in yellow colour.

    Please help me for the vba code.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA code to copy a part of cell value and assign the same to the records present below

    See attached
    Attached Files Attached Files
    Last edited by PCI; 07-04-2015 at 12:22 PM.
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA code to copy a part of cell value and assign the same to the records present below

    Hello PCI,

    I am totally Confused.

    Just how does your example Workbook relate to this issue, or was it a mistake from your side perhaps?

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA code to copy a part of cell value and assign the same to the records present below

    @Winon,
    Thanks a lot, yes it was not the right file attached
    Now updated
    PCI

+ 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] VBA code Error: find the records that match the criteria in a specified cell and copy
    By meer_ali in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-02-2014, 03:30 AM
  2. Replies: 1
    Last Post: 03-04-2013, 09:22 AM
  3. how to assign a part of an array to a cell
    By novice2430 in forum Excel General
    Replies: 5
    Last Post: 10-22-2009, 01:51 PM
  4. Copy For Cell Values Present and not Formulas Present
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2009, 12:10 PM
  5. Assign VBA code to button on .copy sheet
    By Erik_AA__1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2008, 06:33 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