Results 1 to 5 of 5

Thread: Managing Data in Cells

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Lahore
    Posts
    214

    Arrow Managing Data in Cells

    Hi
    Well i m working on this assignment right now , take a look at attachment and in sheet named as "Input" ... jus scroll down to take a look . u ll find 9 different blocks each distinguished by different colour ( in actual scenario there is no colouring )
    now in each block i have to go for the string "GENSET IN OPERATION" .if i find this string in that block ( like in second block at position "A32" , in Seventh block at "A133", in ninth block at "A174") .. then it should creat an output sheet just like i have created as second sheet named as "Result" , Scan that specific block and fill in the information i have filled like ... for second block , Event Time and Event Date are at "A20" , Clear Time and Clear date are at "A37"... i need them in separate cells just like i have put them in .. and Event Type is definitly that string i was looking for ..
    Two Blocks are separated by a line ... also u can use clear cell as ending and event cell as starting of a block ..
    the result sheet attached is manually made , since blocks were only 9
    my problem is that i have thousands of such blocks ... i need ur help
    Regards
    Attached Files Attached Files

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Lahore
    Posts
    214

    Unhappy Re: Managing Data in Cells

    I am sitting in front of PC since last 8 hours, somebody plz help me . if not with complete solution , atleast somewhere to start from . anything

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Managing Data in Cells

    Whats making this difficult is the format of your first sheets data storage. It should be stored in columns and not rows. If you cant change the format then you just have to work harder.

    There is a .Find method of the range object. You can specify what to search for and start from location.

    Performing a macro is always the easiest way to determine how Excel does certain things.

    Since this is an assignment I will guide you. Check the help file for the .Find method. You will start with searching in a loop for the "GENSET" text. Then when found you do a inner loop .Find' ing the particular info you need to copy to sheet2.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Location
    Lahore
    Posts
    214

    Re: Managing Data in Cells

    Thanks Rob for ur consideration but as a matter of fact , i have a text file of first data storage sheet . i copied a part of it in excel to give it a current shape , do u have some betta options if we work on raw data having it as text file ... also its not exactly a assignment . i m telecom engineer and donno much abt vb .. this is a task my boss gave to me and a i have to do it somehow or other []
    i have attached text file aswell
    Attached Files Attached Files

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Managing Data in Cells

    If you do it with a textfile then you will have to read it all into an array and then go line by line looking for your GENSET and other criteria.

    Either way will work and both ways have the complications of being stored vertically vs horizontal.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width