+ Reply to Thread
Results 1 to 5 of 5

macro to combine two cells date notation

  1. #1
    Registered User
    Join Date
    09-27-2017
    Location
    Venlo
    MS-Off Ver
    2016
    Posts
    70

    macro to combine two cells date notation

    I am having a problem with an excel sheet. I have a sheet which imports a csv file and some time values. but i need to add a specific value. Additionally I need to be able to change this value from 1 up to 12. Is there a way to do this. the data gets popped in Column A from A11.

    Yes i can write a macro which adds the value to the whole column but not specific for the range in which the data is located.
    Last edited by Gielekes; 10-10-2017 at 02:13 AM.

  2. #2
    Forum Contributor
    Join Date
    12-02-2010
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2013, 2016
    Posts
    100

    Re: macro to combine two cells data notation

    Hello Gielekes,

    You don't have to add just one value to the entire "A" column. This code would add something to only the cells that have something in them:
    Please Login or Register  to view this content.
    You could additionally set up some logic loops to split numbers of the populated cells in the "A" column. There are a few ways to tweak this code based on your specific needs but since you said you have times i figured a string-based solution was best. You could always make it number-based though.

    Let me know if I can help further,

    DarkF1ame
    Mark as "Solved" and add Reputation if applicable.

  3. #3
    Registered User
    Join Date
    09-27-2017
    Location
    Venlo
    MS-Off Ver
    2016
    Posts
    70

    Re: macro to combine two cells data notation

    When I use the code, the data gets converted into numbers instead of a date.

  4. #4
    Forum Contributor
    Join Date
    12-02-2010
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2013, 2016
    Posts
    100

    Re: macro to combine two cells data notation

    Gielekes,

    If you can upload a worksheet that will help. Without that you can play around with the datevalue operator:
    Please Login or Register  to view this content.
    The "d" in the DateAdd operator would add your integer to the day, "m" would be month, "y" for year.

  5. #5
    Registered User
    Join Date
    09-27-2017
    Location
    Venlo
    MS-Off Ver
    2016
    Posts
    70

    Re: macro to combine two cells data notation

    Thanks this helps a lot

+ 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. Average a column cells notation
    By ferday in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2016, 07:07 AM
  2. [SOLVED] Macro to combine cells in a row to 1 cell while skipping blank cells
    By ywang in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-18-2014, 10:39 AM
  3. [SOLVED] Macro to combine cells in a row to 1 cell while skipping blank cells
    By ywang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2014, 07:41 PM
  4. [SOLVED] Using Cells property and R1C1 notation to pass Excel data to Word
    By franzbiberkopf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2013, 10:45 AM
  5. Macro to combine two cells into one
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2011, 02:09 PM
  6. Macro to combine cells data based on same values
    By spice in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-15-2011, 08:58 AM
  7. Macro to combine cells
    By c mcg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2006, 09:10 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