+ Reply to Thread
Results 1 to 3 of 3

Userforms Show Data from specific ROW dynamically (and perform Date arithmetic)

  1. #1
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Userforms Show Data from specific ROW dynamically (and perform Date arithmetic)

    Hello Seniors,

    I Have a Worksheet, wherein ROW 8 acts as header. Data range would vary say a9:az10000 or so. (dynamic data range keeps expanding / contracting).
    Data range could be Filtered (hidden row) or Unfiltered.

    Depending on Row Number specified by a User in USER-FORM, USER-FORM should automatically populate / display key data from relevant Row from corresponding Column.

    Say, When Userform is Loaded, User has to Key-in Row Number, say Row # 22

    Terminal Date (Textbox) = C22 (DATE FORMAT IDEALLY, DD-MMM-YY)
    Time Date (Text box) = O22 (DATE FORMAT IDEALLY, DD-MMM-YY)
    DIFF (TEXTBOX) = C22-O22 (NUMBER OF DAYS, numeric)
    TARGET (TEXTBOX) = TIMEDATE(O22) + DIFF = DERIVED DATE (DATE FORMAT IDEALLY, DD-MMM-YY)

    IDENTIFIER = B22
    Label H4 = I22
    Label FWD = P22
    Label EXPECT = Q22
    Label PEP =R22
    Label PED = S22

    Likewise, once I get basic code for above sample, I will make other Text Labels and Textbox to populate / fill required data from Column X to Column AZ for display purpose on User-Form, depending on requirements.

    Once Row Number is changed, if possible, without unloading form everything should change consequentially.

    Please Note that above displayed (Specific row) data would then be subject to further calculation on same form, as and when my work expands.

    Sample workbook is attached.
    Attached Files Attached Files
    Last edited by analystbank; 08-12-2019 at 02:47 AM.

  2. #2
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Re: Userforms Show Data from specific ROW dynamically (and perform Date arithmetic)

    In the given workbook, I am able to populate required data from ACTIVE ROW using following code, except ROW Number.

    Please Login or Register  to view this content.
    Now require guidance from learned seniors .

    In above code, limitation is that, it will populate data from active row only. While USERFORM is in use, I can not change ACTIVE ROW. So, How to read ROW Number in first Textbox, take it as variable and assign to ROW number and populate /change data accordingly, based on ROW number.

    I trust, it is doable. Thanks. Since,I have changed couple of Textbox Caption, and Code is built accordingly, I am appending the sample workbook again here.

    Other Clue, from Properties Window, I set ShowModal = False. I am able to change row and scroll spreadsheet. By changing ROW my USERFORM still shows old data only, so, how to take this hint to update /populate data record from changed ACTIVEROW, if this could be easier, i can drop idea to have ROW Number on Userform to populate data. Can this be done through Event ? How?

    I am near to solution, if someone can guide suitably, please. Thanks
    Attached Files Attached Files
    Last edited by analystbank; 08-13-2019 at 02:43 AM.

  3. #3
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Lightbulb Re: Userforms Show Data from specific ROW dynamically (and perform Date arithmetic)

    Got it, I just added one Commandbutton, and added code to UNLOAD and SHOW UF to get it update from changed ACTIVEROW.

    First time, raised the query and through learning solved also :D

    Nonetheless, would appreciate some other better alternate.

    Would still love to know, how to put manually ROW Number on USERFORM, pass it on this ROW Number to some variable and change ACTIVE ROW accordingly.
    Last edited by analystbank; 08-13-2019 at 02:54 AM.

+ 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. [SOLVED] Enter data into a userform text box to show in a specific cell in a specific worksheet
    By Stevecraig211 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2016, 10:02 AM
  2. Replies: 3
    Last Post: 08-04-2015, 08:03 AM
  3. Replies: 9
    Last Post: 06-28-2015, 08:07 PM
  4. Userforms - To populate data on a specific sheet and columns
    By paradoxofthecat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2014, 01:33 PM
  5. automation of copyin txt file to excel and perform arithmetic calculatoins
    By midz87 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2011, 05:20 AM
  6. Date Arithmetic
    By new2XL in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-18-2008, 10:25 AM
  7. Show two UserForms and transfer data
    By jagman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-27-2008, 01:00 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