[Solved] Rearranging Excel Cell based on Value [closed]

This sub procedure works with two variant arrays. Option Explicit Sub Macro3() Dim i As Long, j As Long, nr As Long Dim tmp As Variant, arr As Variant, hdr As Variant, vals As Variant With Worksheets(“sheet4”) tmp = .Cells(1, “A”).CurrentRegion ReDim vals(LBound(tmp, 1) To UBound(tmp, 1), LBound(tmp, 2) To UBound(tmp, 2)) nr = UBound(tmp, … Read more

[Solved] Extracting the characters between two – in the current string in an excel macro [closed]

In your case, if the suggested method Text-To-Columns is not an option somehow, you could use: =TRIM(MID(SUBSTITUTE(A1,”-“,REPT(” “,LEN(A1))),2*LEN(A1)+1,LEN(A1))) This part 2*.. stands for (N-1)*.., in this case the third ‘word’ More information here solved Extracting the characters between two – in the current string in an excel macro [closed]

[Solved] Round cells then auto fill VBA

This should help you get started. Range.Formula property on MSDN Range.AutoFill method on MSDN With Activesheet.Range(“AR8”) .Formula = “=ROUND(IF(AP8>(AN8*P8),AP8,AN8*P8),2)” .AutoFill Destination:=.Resize(100), Type:=xlFillDefault End With 0 solved Round cells then auto fill VBA

[Solved] Sum unique names of column with thouthands of rows [closed]

Try this code below : Sub sumTotal() ‘dim array to store unique names Dim uniqueArray As Variant ‘Sheets(your chosen sheet) With Sheets(1) ‘find last cell with value in A Set last = .Range(“A:A”).Find(“*”, Cells(1, 1), searchdirection:=xlPrevious) ‘for each cell in column to last value found For n = 1 To last.Row ‘if name isnt in … Read more

[Solved] Counting the lines of several txt files [closed]

Try this code Sub Loop_Through_Text_Files_Count_Lines() Dim fso As Object Dim pth As Object Dim strFolder As String Dim strFile As String Dim r As Long With Application.FileDialog(msoFileDialogFolderPicker) If .Show Then strFolder = .SelectedItems(1) & “\” Else Exit Sub End With Set fso = CreateObject(“Scripting.FileSystemObject”) strFile = Dir(strFolder & “*.txt”) Do While strFile <> “” r … Read more

[Solved] How to concatenate values from one column with each vales from second column? [closed]

In C2 enter: =INDEX($A$2:$A$99,ROUNDUP(ROWS($1:1)/3,0)) & “_” & INDEX($B$2:$B$33,MOD(ROWS($1:1)-1,3)+1) and copy downward: NOTE: The number 3 in the formula above is there because there are 3 items in column B To “generalize” the formula replace: 3 with: (COUNTA($B$2:$B$99)) solved How to concatenate values from one column with each vales from second column? [closed]

[Solved] MS EXCEL and a CUSTOM WEBSITE

website: not really. You need msoffice to run the sheet, so unless you manually execute the sheet previously so that the data is available for read (not execute) you can’t do it with ms excel. You can do it with a programming language, depending on what you need and what you are familiar with you … Read more