Excel Automate - get highest number in filtered Column

Diskutiere und helfe bei Excel Automate - get highest number in filtered Column im Bereich Microsoft Office im Windows Info bei einer Lösung; Hello, I want to get the highest number via an automate script in excel in a filtered Column.I had only find out how to get a specific Cell Value... Dieses Thema im Forum "Microsoft Office" wurde erstellt von MaxMeyer., 19. April 2023.

  1. MaxMeyer.
    MaxMeyer. Gast

    Excel Automate - get highest number in filtered Column


    Hello, I want to get the highest number via an automate script in excel in a filtered Column.I had only find out how to get a specific Cell Value "selectedSheet.getRange"M28""But how can i store the highest number in this colum from the unhidden rows?
     
  2. MaxMeyer. Win User

    Excel Automate - get highest number in filtered Column

    Dear Shakiru,
    thanks for your Feedback!
    But i think this one is written for VBA and works great there.

    I have Problems to get this number in Excel Automate with Office Scripts.

    There is get multiple Errors:

    const rng1 = sourceSheet.Range("M1:M" & usedRange)
    Set filteredRng = rng1.SpecialCells(xlCellTypeVisible)
    maxVal = Application.WorksheetFunction.Subtotal(104, filteredRng)

    42, 27] Property 'Range' does not exist on type 'Worksheet'.
    1. [42, 33] The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
    2. [43, 6] Cannot find name 'filteredRng'.
    3. [43, 38] Cannot find name 'xlCellTypeVisible'.
    4. [44, 2] Cannot find name 'maxVal'.
    5. [44, 11] Cannot find name 'Application'.
    6. [44, 55] Cannot find name 'filteredRng'.
  3. Shakiru Soenu Win User

    Excel Automate - get highest number in filtered Column

    Hi MaxMeyer.!

    Please try this
    Sub GetHighestNumber()
    Dim rng As Range
    Dim filteredRng As Range
    Dim maxVal As Variant

    Set rng = ThisWorkbook.Worksheets("Sheet1"). Range("A1:A100") ' Replace with your range
    Set filteredRng = rng. SpecialCells(xlCellTypeVisible)
    maxVal = Application.WorksheetFunction.Subtotal(104, filteredRng)

    ' Store the maximum value in cell M28
    ThisWorkbook.Worksheets("Sheet1"). Range("M28"). Value = maxVal
    End Sub

    In this script, we first define the range we want to find the highest number in (rng). We then use the SpecialCells method to get only the visible cells after the filter is applied (filteredRng). We then use the Subtotal function with the xlMax function number (104) to find the highest number in the filtered range. Finally, we store the maximum value in cell M28.

    You can customize this script to fit your specific needs. Just make sure to update the range references and worksheet names as necessary.

    Kindly let me know, if you require additional assistance, I will be glad to help further.

    Best Regards,
    Shakiru
  4. Andreas Killer Win User

    how to User Index, Match or VLOOKUP or even HLOOKUP in merged Cells

    i need to get the Highest Scores from Cell BB6 to BD27 which are merged , and after achieving the result i need that how many Balls have been Played to reach this Score , and then if Possible to get the Player Name , can any One help
    At first this is the German forum, the English one is here:

    http://answers.microsoft.com/en-us/office/forum/excel

    You missed to specifiy the search criterium for MATCH.

    If you have merged cells you have to change the selected cell references to the first column:

    G73: =INDEX(AZ6:AZ27,MATCH(F73,BB6:BB27,0))

    So the player name is in the same row:

    I73: =INDEX(E6:E27,MATCH(F73,BB6:BB27,0))

    Andreas.
  5. Thom55 Win User

    Datum als Text in Datumsformat umwandel

    ähhh. Claus noch ne Frage

    Get das auch in VBA

    mit

    Columns("U:U").Select

    Selection.TextToColumns Destination:=Range("U1"), DataType:=xlFixedWidth, _

    FieldInfo:=Array(0, 1), TrailingMinusNumbers:=True

    klappts nicht.

    Thom
  6. Michael (Darthdarkpr Win User

    Microsoft Konto wurde gesperrt - Warum? 250GB Fotos / Videos / über / 700 XBOX Games / XBOX GAMEPASS GESPERRT / OFFICE 365 GESPERRT

    Was kann ich noch machen! Ich habe glaube ich in meinem Account keine Telefonnummer hinterlegt gehabt wenn ja ist es evtl. noch meine Alte Rufnummer
    <br />die ich nicht mehr habe! Wie komme ich an mein Account?
    <br />What else can I do! I don't think I had a phone number stored in my account, if so, it may still be my old phone number that I no longer have! How do I get my account?
    <br />How can I be activated again?
    <br />
  7. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

Excel Automate - get highest number in filtered Column - Microsoft Office

Die Seite wird geladen...

Excel Automate - get highest number in filtered Column - Similar Threads - Excel Automate get

Forum Datum

Get the data part of a stuctured column in VBA

Get the data part of a stuctured column in VBA: This will get me a column of data from a structred tableFunction GetNameColumn As Range Dim ws As Worksheet Dim tbl As ListObject Dim colName As ListColumn Set ws = SheetsSheetName Set tbl =...
Microsoft Office 17. Oktober 2024

My "Search" bar in MSList does not find the numbers in the first column

My "Search" bar in MSList does not find the numbers in the first column: Hi all,I have created a MSList, with about 1500 records in it. All the functions are working fine.But when I search for a certain "unique" number, which is in the first column, the "search bar" at...
Microsoft Office 25. Mai 2023

Sum of unique/distinct values of a filtered column

Sum of unique/distinct values of a filtered column: Hi CommunityI would like to have a cell of the sum of the budget which updates automatically when you set the filter. Here, every market's budget will count only once. In the example below the sum...
Microsoft Office 27. Januar 2023

Teilnehmerzertifikate automatisch mit Excel

Teilnehmerzertifikate automatisch mit Excel: Liebe Community, ich habe mich schon durch die Untiefen des Internets geklickt, aber keine zufriedenstellende Lösung gefunden. Und zwar bezieht sich meine Frage auf die Möglichkeit, dass...
Microsoft Office 11. Februar 2022

Excel power query last column missing in input file

Excel power query last column missing in input file: hi all, I am encountering a problem I am not able to solve. I have created a query some month ago which is no longer working because the last column of my input file csv is no longer recognized....
Microsoft Office 16. Juli 2021

Automatisches Speichern in Excel

Automatisches Speichern in Excel: Guten Tag Sie ca Oktober ist das automatische speichern im Office drin. Leider habe ich dadurch viele Dokument überschrieben!!!! Ich möchte ein Downgrade haben wo diese Funktion nicht drin ist,...
Microsoft Office 19. Dezember 2017

Excel automatisches Datum

Excel automatisches Datum: Hallo, ich habe ein Problem mit der Erstellung eines automatischen Datums. Sobald ich das Datum nach unten ziehe wird die Jahreszahl geändert anstelle des Tages. Allerdings ist es nicht möglich...
Microsoft Office 6. Januar 2017
Excel Automate - get highest number in filtered Column solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.