+ Reply to Thread
Results 1 to 9 of 9

I would like to have my data displayed in a different worksheet

  1. #1
    Registered User
    Join Date
    02-18-2021
    Location
    Linne
    MS-Off Ver
    Microsoft 365 Business
    Posts
    55

    I would like to have my data displayed in a different worksheet

    Hi in the example I post the sheet ''gegevens'' is normally connected to a database which I can refresh. Now I would like for instance to have the data in the column ''OFFERTENUMMER'' on sheet gegevens to be displayed on the column ''OFFERTENUMMER'' in the sheet ''€'' so that when I refresh the data on the sheet gegevens and other offertenummers are displayed the column ''OFFERTENUMMER'' on the sheet € changes with it.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-18-2021
    Location
    Linne
    MS-Off Ver
    Microsoft 365 Business
    Posts
    55

    Re: I would like to have my data displayed in a different worksheet

    Let me try to explain further in this new example.

    I displayed the ''OFFERTENUMMER'' on the sheet ''€''. But I would like if I have 25 or 50 or 100 items in the column ''OFFERTENUMMER'' that my table size changes with it. Now the last 3 cells give an error instead of closing the table
    Attached Files Attached Files

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: I would like to have my data displayed in a different worksheet

    Hi there,

    I had prepared this on the basis of the first workbook you posted. I haven't yet looked at the second version

    Take a look at the attached version of your workbook and see if it gets things moving in the right direction. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: I would like to have my data displayed in a different worksheet

    Hi again,

    The attached version of your second workbook might help.

    A minor change to the "ResizeTargetTable" routine has been incorporated.

    Some of the header texts (OFFERTENUMMER2, OMSCHRIJVING and status3) on the target worksheet have been slightly modified to make them consistent with the header texts on the source worksheet,

    Hope this helps.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-18-2021
    Location
    Linne
    MS-Off Ver
    Microsoft 365 Business
    Posts
    55

    Re: I would like to have my data displayed in a different worksheet

    wow thank you.
    I altered my post because I had not scrolled down in the highlihted area. I will proceed with my data and get bacck to you
    Last edited by Neele; 01-21-2022 at 09:00 AM.

  6. #6
    Registered User
    Join Date
    02-18-2021
    Location
    Linne
    MS-Off Ver
    Microsoft 365 Business
    Posts
    55

    Re: I would like to have my data displayed in a different worksheet

    I copied my original database, which is almost the same as in the example (I deleted some colums in the example) and I changed in the macro the text ''gegevens'' to ''data'' which is the name of that worksheet but I get an error. the € is the same, the name of the tables is the same and the name of the headers also. What can I have done wrong or forgotten?

    I guess it has something to do that my database has 44200 rows?
    Attached Images Attached Images
    Last edited by Neele; 01-21-2022 at 10:44 AM.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: I would like to have my data displayed in a different worksheet

    Hi again,


    I guess it has something to do that my database has 44200 rows?

    It does indeed! That value will cause an Overflow error because the variable which holds the number of rows is declared as being of type Integer (maximum value = 32767).

    The code in the attached workbook declares the above variable as being of type Long - this should overcome the problem.

    Regards,

    Greg M
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-18-2021
    Location
    Linne
    MS-Off Ver
    Microsoft 365 Business
    Posts
    55

    Re: I would like to have my data displayed in a different worksheet

    Thank you I changed it to long. Now I dont get en error anymore but it is loading like for ever.. Is that because it is so much data or what might be the problem

    loading.png

  9. #9
    Registered User
    Join Date
    02-18-2021
    Location
    Linne
    MS-Off Ver
    Microsoft 365 Business
    Posts
    55

    Re: I would like to have my data displayed in a different worksheet

    I would also like to add some more columns. So I have to alter this:

    For Each vHeader In Array("OFFERTENUMMER", "PROJECT", "PostOmschrijving", _
    "POSTNUMMER", "status")

    why is there an underscore after postomschrijving? and postnummer continues in the next line, How do I have to interprete this in order to add more columns?
    Last edited by Neele; 01-25-2022 at 11:23 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] Worksheet Name to be Displayed Automatically
    By Rajeshkumar R in forum Excel General
    Replies: 4
    Last Post: 11-25-2016, 02:33 AM
  2. Dependant Combo boxes, filter and displayed data from another worksheet
    By gsrai31 in forum Excel Programming / VBA / Macros
    Replies: 45
    Last Post: 02-23-2016, 11:51 AM
  3. Dependant Combo boxes, filter and displayed data from another worksheet
    By mlitz80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2015, 07:25 AM
  4. Replies: 2
    Last Post: 07-29-2014, 05:11 PM
  5. Using Classes to manipulate the displayed data on worksheet
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2013, 10:00 PM
  6. Dependant List boxes, filter and displayed data from another worksheet
    By gsrai31 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2013, 07:36 PM
  7. List box not being displayed in second worksheet
    By Brian in forum Excel General
    Replies: 2
    Last Post: 01-27-2005, 01:06 PM

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