Snippets Collections
import pandas pd

excel_file = pd.read_excel(‘file.xlsx’, sheet_name=None)
dataset_combined = pd.concat(excel_file.values())
'In this Example I am Copying the File From "C:Temp" Folder to "D:Job" Folder
Sub sbCopyingAFile()

'Declare Variables
Dim FSO
Dim sFile As String
Dim sSFolder As String
Dim sDFolder As String

'This is Your File Name which you want to Copy
sFile = "Sample.xls"

'Change to match the source folder path
sSFolder = "C:Temp"

'Change to match the destination folder path
sDFolder = "D:Job"

'Create Object
Set FSO = CreateObject("Scripting.FileSystemObject")

'Checking If File Is Located in the Source Folder
If Not FSO.FileExists(sSFolder & sFile) Then
    MsgBox "Specified File Not Found", vbInformation, "Not Found"
    
'Copying If the Same File is Not Located in the Destination Folder
ElseIf Not FSO.FileExists(sDFolder & sFile) Then
    FSO.CopyFile (sSFolder & sFile), sDFolder, True
    MsgBox "Specified File Copied Successfully", vbInformation, "Done!"
Else
    MsgBox "Specified File Already Exists In The Destination Folder", vbExclamation, "File Already Exists"
End If

End Sub
Sub Clearcells()
'Updateby Extendoffice
Range("B8", "B12").Clear
End Sub
ZEICHEN(10)

Bsp: 
=C1&ZEICHEN(10)&D1
Public Sub SolveFive(Optional ShowAlert As Boolean = True)

'Purpose    : Runs Solver Loops through the '5YrChoice_MVoptions' Tab
'Author     : Jimmy Briggs <jimmy.briggs@pwc.com>
'Description: Automate Workflow for RLUS Client
'Date       : 2022-02-04

 Application.ScreenUpdating = False
 Application.DisplayStatusBar = True
 Application.Cursor = xlWait
 On Error GoTo HandleError

 Dim changeCells As Range
 Dim Result As Integer
 Dim i As Integer
 Dim StartTime As Double
 Dim SecondsElapsed As Double

 StartTime = Timer

 Application.StatusBar = "Starting Macro for 5YrChoice_MVoptions, please be patient..."

 Sheets("5YrChoice_MVoptions").Select

 For i = 3 To 62 Step 1
    Application.StatusBar = "Running Solver on iteration " & i & " out of 62."
    Set changeCells = ActiveSheet.Range(Range(Cells(i, 28).Address, Cells(i, 29).Address).Address)
    SolverReset
    SolverOptions precision:=0.000000001
    SolverOK SetCell:=Cells(i, 35).Address, MaxMinVal:=2, byChange:=changeCells.Address
    SolverAdd CellRef:=Cells(i, 36).Address, Relation:=2, FormulaText:=0
    SolverAdd CellRef:=changeCells.Address, Relation:=3, FormulaText:=0.0000000001
    Result = SolverSolve(True)

    If Result <= 3 Then
        SolverFinish KeepFinal:=1
    Else
        Beep
        MsgBox "Solver was unable to find a solution.", vbExclamation, "SOLUTION NOT FOUND"
        SolverFinish KeepFinal:=2
        GoTo Skip
    End If

Skip:
    SolverFinish KeepFinal:=2
    Next i

 Sheets("Comparison").Select
 SecondsElapsed = Round(Timer - StartTime, 2)
 Range("Latest_Execution_Time_5").Value = SecondsElapsed

 If ShowAlert = True Then
    MsgBox "Successfully ran code in " & SecondsElapsed & " seconds", vbInformation
 End If

 Application.StatusBar = "Done running Solver for sheet 5YrChoice_MVoptions."
 Application.OnTime Now + TimeValue("00:00:07"), "clearStatusBar"
 Application.ScreenUpdating = True

HandleExit:
    Application.Cursor = xlDefault
    Exit Sub
HandleError:
    MsgBox Err.Description
    Resume HandleExit

End Sub
Sub ClearData()
 
Worksheets("Clients").Rows("2:" & Rows.Count).ClearContents
Worksheets("Cases").Rows("2:" & Rows.Count).ClearContents
Worksheets("Sessions").Rows("2:" & Rows.Count).ClearContents
 
End Sub
Sub ClearData()

Worksheets("Clients").Rows("2:" & Rows.Count).ClearContents
Worksheets("Cases").Rows("2:" & Rows.Count).ClearContents
Worksheets("Sessions").Rows("2:" & Rows.Count).ClearContents

End Sub
star

Thu Sep 08 2022 07:34:52 GMT+0000 (UTC) https://analysistabs.com/excel-vba/copy-files-one-location-another-folder-directory/

#vba #excel
star

Fri Jun 10 2022 08:31:24 GMT+0000 (UTC)

#excel
star

Fri Jun 10 2022 06:07:27 GMT+0000 (UTC) https://www.office-hilfe.com/support/threads/zaehlen-wie-haeufig-ein-wert-vorkommt.51153/

#excel
star

Thu Jun 09 2022 15:10:22 GMT+0000 (UTC) https://de.extendoffice.com/documents/excel/4088-excel-button-to-clear-specific-cells.html#:~:text=Normalerweise%20k%C3%B6nnen%20Sie%20die%20halten,dann%20den%20Zelleninhalt%20nach%20Bedarf.

#excel #macro
star

Wed Jun 08 2022 09:32:51 GMT+0000 (UTC) https://exceltricks.blog/mit-der-funktion-zeichen10-koennen-sie-einen-zeilenumbruch-in-einer-zelle-einfuegen/#:~:text=Mit%20der%20Funktion%20VERKETTEN(),%3DZEICHEN(10)%20erreichen.

#excel
star

Mon Feb 07 2022 18:08:40 GMT+0000 (UTC)

#vba #excel
star

Wed Feb 02 2022 21:39:08 GMT+0000 (UTC)

#excel #vba #macro
star

Tue Feb 01 2022 21:37:39 GMT+0000 (UTC)

#excel
star

Fri Feb 26 2021 04:08:24 GMT+0000 (UTC)

#excel #vba

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension