+ Reply to Thread
Results 1 to 9 of 9

Variabele selectie

  1. #1
    Registered User
    Join Date
    04-24-2015
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    13

    Variabele selectie

    Allen,

    Wellicht een eenvoudige vraag maar ik kan het antwoord niet vinden.
    Probleem;
    In een cel staat: SOM(A1:A10)
    Nu is cel A10 niet altijd de laatste in de rij. Ik heb in cel B1 staan wat de laatst gebruikte cel is in kolom A, bij voorbeeld 20.
    Ik wil de formule dus aanpassen in de trant van:
    SOM(A1:A & B1)
    Maar zo simpel is het leven niet want deze syntax geeft een foutmelding.

    Wie weet de oplossing.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Variabele selectie

    Hi welcome to the forum

    I speak afrikaans, which is fairly close to dutch, and if I understand you correctly, you want to find the last cell with a value in it? If so, then try this...
    =INDEX($A$1:$A$10,MATCH(0,A1:A10,-1))

    If that was not what you wanted, please ask in english, or ask for your thread to be moved to the non-english forum, and upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Variabele selectie

    Welkom bij de forum.

    Als u echt de nummer van B1 gebruiken wilt, kunt u deze formule gebruiken (in het Engels, sorry - ik heb geen NL versie in werk):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Maar dan moet u de laatse gebruikte cel in B1 invullen, wat kan vergeten zijn.
    Dus wordt het mischien beter uw formule met die van FDibbins te combineren:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Maak de $A$100 zo groot als nodig is - als u soms tot rij 500 gebruiken, dan maak het $A$1:$A$1000 enz.

    Hierbij een bestand met de formulen - dan kunt u hen in het NL zien: Sum to last row used in column A _ voor RobFontaine.xls

    (Het spijt me als er fouten met mijn Nederlands zijn - het is niet mijn moedertaal.)
    Last edited by Aardigspook; 12-31-2015 at 05:30 AM. Reason: Add welcome
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  4. #4
    Registered User
    Join Date
    04-24-2015
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    13

    Re: Variabele selectie

    All,

    Thanks for your help. I will continue in English because it's more easy for you, I think.
    Aardigspook, when I use your solution it works perfectly but the SUM command was only for my example, to makes it easy.
    In real live I am going to use the DIRECT command in a 6st order polynomial matrix formula:

    {=LINEST(B3:B23;A3:A23^{1\2\3\4\5\6};TRUE;FALSE)}

    B23 is the one who is variable. The length of the column is visible in cell E24.

    So, I changed the formula to:

    {=LINEST(B3:INDIRECT("B"&E24);A3:A23^{1\2\3\4\5\6};TRUE;FALSE)}

    But this gives the error: #REF.

    The content of cell E24 is: =COUNTIF(A3:A250;">0")+1
    This gives the length of the column. In the INDIRECT solution I have to use the value of E24 not the content. Maybe that's the problem.

    Do you have any suggestion?
    Both guys, thanks!

    Rob
    Last edited by Rob Fontaine; 01-04-2016 at 07:25 AM.

  5. #5
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Variabele selectie

    EN:

    I think the problem is that E24 is giving the wrong result - because column A is starting in row 3, you need to add 2 not 1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    then your formula will work fine:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I've attached a file showing it working for me - with random numbers in A3:B23

    NL

    Het probleem ligt in E24, denk ik - omdat kolom A begint in rij 3, moet je +2 gebruiken in plaats van +1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Dan werkt u uw formule goed:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Hierbij een bestand: Indirect _ voor Rob Fontaine.xlsx

    mvg,
    Last edited by Aardigspook; 01-04-2016 at 03:26 PM. Reason: 1. Add attachment. 2. Chg commas to semi-colons in Dutch formulae.

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Variabele selectie

    Iets meer: u moet ook, denk ik, INDIRECT gebruiken voor kolom A:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Ik ben niet zo goed in 'polynomial matrices' dus misschien heb ik dat fout - maar in mijn bestand werkt het anders niet.

    Hierbij het bestand met deze formule: Indirect v2 _ voor Rob Fontaine.xlsx

    mvg,

  7. #7
    Registered User
    Join Date
    04-24-2015
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    13

    Re: Variabele selectie

    Guy's,

    I'm still puzzled about how to integrate this function.
    I have attached my Excel file. Will you please be so kind to look into this file?
    Thanks in advance.

    Polynomial generator.xlsx

  8. #8
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Variabele selectie

    Okay, there are two solutions I can see for E3 and E4:

    Nr 1 - using INDIRECT
    Change the formula in E24 to this (to allow for any zero values in column A):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then use these formulae in E3 and E4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    These give the same results as the formula you have in those cells at the moment, with A3:A23, B3:B23 and C3:C23 manually entered.

    Nr 2 - using Dynamic Named Ranges
    First, set up some Named Ranges for A3:Axxx, B3:Bxxx and C3:Cxxx. Select A3:A23 (or A3:A## - it doesn't actually matter). In the box to the left of the formula box (where it should be showing 'A3' now), type 'NR_Data_x' (without the inverted commas). Repeat with B3:B23, using 'NR_Data_y1', then with C3:C23, using 'NR_Data_y2'.
    Now go to 'Name Manager' on the 'Formulas' tab. (In het Nederlands - 'Namen beheren' op de 'Formules' tab.)
    Select the 'NR_Data_x' Name. In the 'Refers to' box at the bottom, over-write what's there with this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You can reduce $A$10000 to $A$1000 or $A$100 if your data will never go beyond that row.
    Repeat for 'NR_Data_y1' and 'NR_Data_y2', replacing the 'A' references with 'B' and 'C'.
    These Dynamic Named Ranges will automatically expand/contract with the number of rows of data - in this case, to the last numeric entry in the range A3:A10000. So you now don't need cell E24, unless you need a visual reference of how many values you have (if you do, then change it as in Nr.1 above). You certainly don't need to use INDIRECT.

    Instead, change the formulae in E3 and E4 to these:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A note on naming of Named Ranges: there are some limitations on what you can call them - you can't use certain 'reserved' names such as 'Print_Area', for example, and can't use anything which could be a cell reference (so CAB123 can't be used). They must start with a letter, backslash or underscore and can only include numbers, letters and full stops (.) - no spaces. I therefore always start my Names with 'NR_' to indicate 'Named Range' then use underscores to label them further - you may have another system you want to use.

    As I hinted at above, my 25-years-out-of-date first year university maths isn't up to the polynomial calculations you're doing in this file - but the formulae I've provided above give you the same results as your manual ones, so I hope that helps.
    Here's the file with the Dynamic Named Ranges working (on sheet BM 30-14 only): Polynomial generator _ AS.xlsx

  9. #9
    Spammer
    Join Date
    03-22-2016
    Location
    india
    MS-Off Ver
    yups
    Posts
    6

    Re: Variabele selectie

    Variabele selectie met JOIN mogelijk?:-
    heb de volgende query die van alle data die op een dag is ingevoerd de laatste datetime-rij eruit vist zodat ik de waarden uit de kolommen er naast weer kan geven. De resultaten komen in een grafiek.
    PHP Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    $curmQuery = sprintf("SELECT a1.*
    FROM table1 a1
    INNER JOIN (
    SELECT max( dt1 ) AS max
    FROM table1
    GROUP BY date( dt1 )
    )a2 ON a1.dt1 = a2.max
    ORDER BY dt1 ASC");
    $curmData = mysql_query($curmQuery) or die('Invalid query: '.mysql_error());

    if ($curmData) {
    while ($row = mysql_fetch_array($curmData)) {
    $dat=$row['dt1'];
    $dagopbrengst=$row['xyz'];
    //add to data array
    $dataArray[$dat]=$dagopbrengst;
    }
    }

+ 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. dropdown list verwijderen na selectie
    By rcb8dboy in forum Non English Excel
    Replies: 2
    Last Post: 10-10-2015, 11:07 AM
  2. Replies: 0
    Last Post: 06-25-2013, 01:52 PM
  3. Variabele weergave
    By interweg in forum Non English Excel
    Replies: 1
    Last Post: 07-08-2011, 12:28 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