+ Reply to Thread
Results 1 to 10 of 10

Need modification in recorded macro, to desired total number of data

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question Need modification in recorded macro, to desired total number of data

    Hi All,

    Please find my attached example excel...where i have some data which are need to be allocated to different persons in different numbers.. so i used index match function to get it and i also recorded my macro to fill Name1 and Name2 column....

    Why i used relative reference macro recording is because the column H and I where i placed my formula may vary due data sufficiency.... it may change to L and M column or E and F column.. so i need the macro should run anywhere i place the cell selected.

    Difficulty i face is the number of data ie: in example excel i have 34 data so i auto filled the formula to all data.

    Daily i have different number of data, that is total number of data is found in Sheet2 in B14 and E14...i cant record a macro to auto fill the desired range that is total number of data (rows).

    What i need is if i run the macro it should apply the formula and fill the formulas to the total number of data that changes every time... and all formula cells should be pasted special value.

    Thanks in advance... Expecting a urgent help...
    Attached Files Attached Files
    Last edited by bmbalamurali; 11-05-2013 at 04:19 AM. Reason: Correction
    Bala

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need modification in recorded macro, to desired total number of data

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Need modification in recorded macro, to desired total number of data

    Hi Patel,

    Thanks... looks good...

    When i tried it showing run time error "1004"Autofill method of range class failed... and when i click debug it highlights the below line in Blue...

    Kindly look and provide me solution... Thanks in Advance...

    Please Login or Register  to view this content.
    Last edited by bmbalamurali; 11-05-2013 at 05:20 PM. Reason: correction

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need modification in recorded macro, to desired total number of data

    I did not test your code because:
    1) i dont know the sheet you want start the code in
    2) your code start with activecell, what cell ? it's very deprecated using activecell without any reference.

  5. #5
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question Re: Need modification in recorded macro, to desired total number of data

    Hi Patel,

    Thanks...able to understand the difficulty.... Lets forget the macro i recorded...can you please give a macro solution accomplish my task...

    In my attached excel...i have match index formulas to allocate the data to different persons... and what i need is that the macro should post headings name1 and name2 and comments and apply the formula and it should fill up to total number of data with allocated person names...

    As my data changes daily i want the macro to perform formulas and allocate to all data with paste value special.... Thanks in advance...
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need modification in recorded macro, to desired total number of data

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need modification in recorded macro, to desired total number of data

    Maybe:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Need modification in recorded macro, to desired total number of data

    Hi Patel,

    Thanks same error showing.... am not well versed in coding i cant able to find.

    Hi Davis,

    Thanks.....for your code...

    But actually its not doing the core objective of my need.. its updating something sheet 2 and not allocating names in Sheet1...
    I fear is my explanation is totally showed off a wrong overview on need... Actually i needed a macro to allocate Names to certain number of times in sheet 1 based on data available in sheet 2...

    Am too much searching internet as a hell.. but cant understand what error comes in Patel code.... Please come back if my explanation not clear... seeking a solution.. Thanks....

  9. #9
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Need modification in recorded macro, to desired total number of data

    I tested my code on your attached file, it works

  10. #10
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Need modification in recorded macro, to desired total number of data

    Thanks for all your support.... It worked..

+ 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. Number of total calls in desired time frames
    By skate1991 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2013, 11:37 AM
  2. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  3. [SOLVED] excel 2007 chart macro graphs data only from sheet on which macro was recorded
    By JW1028 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2013, 06:33 PM
  4. how can i input data into a pre-recorded macro
    By Beyondjl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2005, 09:05 AM
  5. Urgent !!! Macro for Number to Text Modification
    By shashidharga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2005, 11:56 AM

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