본문 바로가기

Etc./Excel VBA7

Efficient resolution of the Colebrook-White equation 개요 비압축성 유체가 파이프를 흐를 때 마찰에 의한 수두손실 계산을 위한 Darcy friction factor를 구하는 VBA Code이다. Reynolds Number 2300 미만은 층류유동으로 friction factor f=64/Re로 계산이 되고, 천이 및 난류유동에서는 Colebrook의 공식 의해 Darcy friction factor를 계산할 수 있다. 아래 VBA Code는 D. Clamond의 논문에 언급된 Matlab Code를 참고하여 수정한 것이다. VBA CODE 'Colebrook Equation ' 'This VBA code was coded by referring to matlab code by D. Clamond 'Clamond D. Efficient resolution.. 2023. 1. 20.
엑셀 탭 이름 리스트로 만들기 Sub shtName_List() For i = 1 To ActiveWorkbook.Sheets.Count Cells(i, 1).Value = Sheets(i).Name Next i End Sub 2023. 1. 17.
Excel파일 PDF 변환 '#################################################################################################################################################################################################################### 'Excel2PDF: 2015.10.03, icarus. 'Version 1.0 '##########################################################################################################################################.. 2023. 1. 17.
하이퍼링크로 지정된 경로의 파일 다운로드 Sub File_Download() Dim i, l As Integer l = InputBox("자료를 다운받을 마지막 행을 입력하세요.", "행 입력") For i = 1 To l Range("C" & i).Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True Application.Wait DateAdd("s", 2, Now) '다음파일 다운로드까지 시간지연 2초, 시간을 변경하려면 숫자를 수정할 것 Next i = i + 1 End Sub 2023. 1. 17.
Delete HyperLinks Sub dhDeleteAllHyperLinks() Dim s As Object For Each s In Sheets s.Hyperlinks.Delete Next s End Sub 2013. 11. 26.
Excel VBA : Delete Name (불필요한 이름 삭제) 이름 삭제 (1) Sub Delete_Names() Dim n As Name On Error Resume Next For Each n In ThisWorkbook.Names n.Visible = True n.Delete Next n End Sub 이름 삭제 (2) Sub del_Names() Dim n As Long With ActiveWorkbook Do Until .Names.Count = 0 .Names(1).Delete Loop End With End Sub 숨겨진 이름 표시 Sub Show_Names() Dim n As Name For Each n In ThisWorkbook.Names n.Visible = True Next n End Sub 2013. 11. 25.
728x90
반응형