+ Reply to Thread
Results 1 to 2 of 2

Data need to set in the format

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    14

    Data need to set in the format

    I have data in one sheet and format in second sheet.
    I need to fill the data in the given format. Please help me.

    Format is having 2 sheets to print on A4 Page,
    Trip No 1 having 4 Employees should be printed on 1st half page and
    Trip No 2 having 3 Employees should be printed on 2nd half page.

    Like this all the data to be set based on Trip No.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,858

    Re: Data need to set in the format

    Hi prasademany,

    Try the attached modified copy of your file that uses the Macro below.

    I assumed that your data was already sorted by Trip Number (Primary Sort) and Sl. No. (Secondary) just like your sample Data.
    I added a 'Format Code' (Cells I11:K11) that contains Date, Time, Page Number, Position on the Page for two reasons:
    a. If you drop the papers, it would be easier put them in order
    b. If you revise the data, you can tell which one was printed first

    In Ordinary Code Module ModFillInLogSheet:
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    To enable Macros and to Run Macros see the following:
    http://office.microsoft.com/en-us/ex...010031071.aspx
    http://office.microsoft.com/en-us/ex...010014113.aspx
    If help is still needed do a google search for 'youtube excel enable macro' and/or 'youtube excel run macro'.

    To access Visual Basic (VBA) see:
    http://www.ablebits.com/office-addin...a-macro-excel/
    a. Click on any cell in the Excel Spreadsheet (may not be needed).
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.

    Debugger Secrets:
    a. Press 'F8' to single step (goes into subroutines and functions).
    b. Press SHIFT 'F8' to single step OVER subroutines and functions.
    c. Press CTRL 'F8' to stop at the line where the cursor is.
    d. 'Left Click' the margin to the left of a line to set (or clear) a BREAKPOINT.
    e. Press CTRL 'G' to open the IMMEDIATE WINDOW. 'debug.print' statements send their
    output to the IMMEDIATE WINDOW.
    f. Select View > Locals to see all variables while debugging.
    g. To automatically set a BREAKPOINT at a certain location put in the line:
    'Debug.Assert False'
    h. To conditionally set a BREAKPOINT at a certain location put in lines similar to:
    if i >= 20 and xTV20 > 99.56 then
    Debug.Assert False
    endif
    i. A variable value will be displayed by putting the cursor over the variable name.

    To manually set a breakpoint, see http://www.wiseowl.co.uk/blog/s196/breakpoints.htm

    Lewis

+ 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. Format cells based on 2 separate cell data, incorporated into the format
    By Laur_E in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-11-2019, 01:57 AM
  2. [SOLVED] Change automatically Data Label & Vertical Axis format based on data value format
    By Neilesh Kumar in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-01-2018, 01:14 AM
  3. Autopopulate Format from data (format needs to be flexible with additional data)
    By Evilbober in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2014, 04:58 PM
  4. [SOLVED] Require vba or formula for convert general format data in date format
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-10-2013, 03:53 AM
  5. Replies: 0
    Last Post: 03-23-2012, 04:28 PM
  6. How to Convert Matrix format data into tabular format data
    By nishchints in forum Excel General
    Replies: 1
    Last Post: 02-22-2012, 03:53 PM
  7. Lock Cell Format - Allow copy and paste of data without format change
    By Chris12InKC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2006, 12:50 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