+ Reply to Thread
Results 1 to 8 of 8

Dynamic range based on find function

  1. #1
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Dynamic range based on find function

    Hi,

    See the attached file.

    - It contains three datafeeds sheet, which pulls data from an external website. (Dutch, German, Nordic)
    - DataCollection Sheet, This sheet is updates when the excel workbook is opened with the data from the datafeeds sheets.
    - DataSummary Sheet is the sheet which is supposed to sort the data in the DataCollection sheet into columns. (this is the problem).

    I need the fomula in the DataSummary Sheet to Find the correct value based on the data of the row and data id (eg. ENOYR-10)

    At the moment I only get 0, but the error might have to do with the dates not being dates... or something. If this is the problem, then I need to convert i to dates with VBA when copying it over from the DataFeed sheets to the DataCollection Sheet.

    I hope someone can give a helping hand. Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Dynamic range based on find function

    The issue is that K in Data Collection is not numeric so you need to coerce in your Sumproduct (or alter your VBA such that the values are numeric)

    If you coerce you must ensure you exclude rows containing text (headers) else you will generate errors, eg:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Dynamic range based on find function

    Ahh thanks..

    SO I can just do a replace . with , function in VBA for the K column for each time the macro runs...

    Brilliant, thanks

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Dynamic range based on find function

    Hi,
    the dates are in fact text in both cases which shouldn't be a problem.
    But your values in col K are also text, not numbers. If you replace 31.45 with 31,45 it works

  5. #5
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Dynamic range based on find function

    Just replacing the . with a , works in Excel, however if I do the same with a macro it doesn't.

    Anyone got a solution for doing it so that it is stored as a number rather than text, by using a VBA?

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Dynamic range based on find function

    Maybe you'll want to post an extract of your code ( don't forget the code tags)

  7. #7
    Forum Contributor
    Join Date
    03-09-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Dynamic range based on find function

    Below is the code that I am using, however I also need to convert it to number from text.. as this isn't done automatically when doing it with VBA.

    Do I need to multiply each cell with 1?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Dynamic range based on find function

    I'm not a VBA man myself but the code works.
    You don't have to multiply with 1, it will revert to a number automatically

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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