+ Reply to Thread
Results 1 to 14 of 14

BA code to copy multiple data in one worksheet leaving blank cells in to other worksheet

Hybrid View

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    8

    Thumbs up Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi Alan,
    Thanks ton for quick help. Macro is working fine.
    But have couple of observation in Output sheet regarding Date format. (Refer Excel file - Example 1 3 Customers v1 Macro.xlsm
    1. (Refer Column - C,L & U Date appears as 13th. This is not of issue to be dealt with.
    2. Refer Cell no. D15, D20, M15, M19, V15 & V20. - Date format is changes. Instead of date appearing as 10-Sept-2013 & 1-Oct-2013 is appearing as 09-Oct-2013 & 10-Jan-2013.

    I require one more help in the macro.
    If you can edit macro to meet table requirements as per " Revised Example Data- Table size.xlsx " that will be of great help. I tried but could not succeed.
    I have inserted blank columns between the two tables. This will help me in doing further vlookup etc. into other sheets (I wont have to change formulae of column references a lot.)

    Also if you can help how to Paste screen shot of excel tables ? Somehow I could not figure out how to use it form Signature ?

  2. #2
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi Ripan,
    I am away from my Excel Computer just now. But I will look at all that for you as soon as i can if no one else picks it up.

    Just a few points for you to consider in the meantime:

    1)
    Quote Originally Posted by ripan81 View Post
    ....
    But have couple of observation in Output sheet regarding Date format. .....
    see again what I said about that in post 7. As I said, That may be difficult for me to do, and you will have to experiment due to Excels annoying habit of changing formats, which is further complicated by our different Excel language versions. . But I try to see if I am able to get the VBA code to "overwrite " any VBA made changes to date / Number formats in those columns. I will try. But cannot promise anything on that one..
    NOTE
    1) What comes up in my excel ( what i see ) for dates may be different then what you see!! So that makes it very difficult
    2) ( I expect you know that for example 1 10 2013 means the first of October 2013 to me , and may mean to you tenth of January 2013 !!!!! - Different land conventions!!! )

    _.................................

    ___2)
    Quote Originally Posted by ripan81 View Post
    ........
    Also if you can help how to Paste screen shot of excel tables ? Somehow I could not figure out how to use it form Signature ?
    _ - have another read of my notes on doing that:
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    _ that is basically a summary of all that I know, so try again and then tell me at what point in trying to install the ADD - IN that you have difficulty.
    See also maybe here:
    http://www.excelforum.com/the-water-...ml#post4109080
    or here:
    http://www.mrexcel.com/forum/about-b...rder-help.html


    If it is a problem with installing the ADD-In , then I could give you a File with the code in for one from one of those Add-In tools. You would then run that as a normal code rather than as an Add-In.

    Alan
    Last edited by Doc.AElstein; 09-29-2015 at 09:21 PM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  3. #3
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi

    1)
    Date issues
    This is what I see for the first part of Table 1 Output:

    Attachment 422131

    For the reasons i mentioned already you may have to experiment yourself with the formats within both Input and Output sheets. I have not yet been successful in controlling this fully.

    _.....................................
    2)
    Quote Originally Posted by ripan81 View Post
    ..........
    I require one more help in the macro.
    If you can edit macro to meet table requirements as per " Revised Example Data- Table size.xlsx " that will be of great help. I tried but could not succeed......
    These changes should meet this new requirement:

    Const TLinc = 9: Const TLoutc = 2: Const TLinOffsetc = 26: Const TLoutOffsetc = 26 'Top left column of tables and column offsets
    Dim lc As Long: Let lc = wsOut.Cells(12, Columns.Count).End(xlToLeft).Column 'The Range Object ( cell ) that is the last cell  in the row of interest has the property .End ( argument Xl to left ) appleid to it. This returns a new range ( cell ) which is that of the first Range ( cell ) with something in it "looking back" the XL spreadsheet from the last cell. Then the .Column Property is applied to return a long number equal to the column number of that cell
    Dim TN As Long, lTN As Long: Let lTN = Application.WorksheetFunction.RoundUp(lc / TLoutOffsetc, 0) 'Table number,  Number of Tables  RoundUp in case not all new columns are Full
    _ ..........
    3 )
    Quote Originally Posted by ripan81 View Post
    .....can help how to Paste screen shot of excel tables ? Somehow I could not figure out how to use it form Signature ?
    See my reply in Post # 9 ___2)


    _................

    See how you get on and report back. Then I will see if I can help further

    Alan

  4. #4
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi Ripan,
    Please also check the Data Sheet in " Revised Example Data- Table size.xlsx "

    I see this strange - YY

    Ripon revised Data Sheeet.JPG

    _..

    What do you see

    Alan

  5. #5
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi Ripon,
    _ I have struggled in vain to overcome the mysterious Date Format changes and differences in your sheets. I still do not understand what is going on there!
    _ However, by trial and error. I have come up with a code version of my original code which appears as though it may be giving the correct results. It is a very slow code compared to my original as it involves a lot of copying and pasting. It may however be useful as an intermediate solution. NOTE I HAVE based it on the original test data , so it is BASED ON FILE: „Example -1 3 customers.xlsx‎" from Post #3

    Here is the code:
    http://www.excelforum.com/developmen...ml#post4204335


    Alan

  6. #6
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    8

    Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi Alan,

    Thanks.
    I was away for last few days so could not check posts. Will check tonite & revert.

    Regards
    Ripan

  7. #7
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    8

    Re: BA code to copy multiple data in one worksheet leaving blank cells in to other workshe

    Hi Alan,

    In Data sheet Revised Example Data- Table size.xlsx

    I see
    Aug -13
    Aug -13
    Aug -13
    Aug -13
    Aug -13
    Aug -13
    Sep -13
    Sep -13
    Sep -13
    Sep -13
    Sep -13
    Sep -13

    Not sure why does it appears as Aug-YY etc... ?

+ 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. Macro to copy data from multiple worksheet cells in to a single Master worksheet
    By thunt13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2015, 03:24 PM
  2. Auto fill worksheet cells based on certain criteria w/out leaving blank rows.
    By Txprospector in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-10-2014, 07:35 AM
  3. [SOLVED] VBA code to copy certain cells from one worksheet into a single row in another worksheet
    By thedefense in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2013, 06:11 PM
  4. [SOLVED] copy data from cells in a column on one worksheet to a single cell in another worksheet
    By jpsnickers in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2013, 07:02 PM
  5. [SOLVED] Copy multiple worksheets data & paste into blank columns in summary worksheet
    By guest99999 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-21-2013, 09:56 AM
  6. [SOLVED] Macro to copy cells from one worksheet to another copies worksheet data as image instead??
    By michaeljoeyeager in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2012, 11:26 AM
  7. Copy certain cells from one worksheet to another worksheet with blank rows
    By pmarsella in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2009, 07:57 AM

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