[Solved] Calucating the total number of cells in a row that are less than 16 hours [closed]

Assuming that column A of sheet1 are date/times, and not text, and you are attempting to find how many date/times are more than 16 hours old then you simply want to place the following formula in sheet2!F7: =COUNTIF(sheet1!A:A,”<“&NOW()-0.75) (16 hours is 0.75 of a day.) If the data in column A is text, then it … Read more

[Solved] Need Someone That Can Read This VBA Script! Fairly Simple [closed]

Public Sub MakeColumnsFromRows() Dim totalCutsToMake As Integer Dim currentColumn As Integer Dim currentCut As Integer Dim rowsToCut As Integer Sheets(4).Activate rowsToSkip = 10 totalCutsToMake = (ActiveSheet.UsedRange.Rows.Count / rowsToSkip) currentColumn = 1 Dim RowCount As Integer For currentCut = 1 To totalCutsToMake RowCount = Cells(Rows.Count, currentColumn).End(xlUp).Row Range(Cells(rowsToSkip + 1, currentColumn), Cells(RowCount, currentColumn + 2)).Select Selection.Cut Cells(1, … Read more

[Solved] Want to concatenate multiple row data in in cell along with its values if present. Emp Id should not come if no data available infromt of it

Want to concatenate multiple row data in in cell along with its values if present. Emp Id should not come if no data available infromt of it solved Want to concatenate multiple row data in in cell along with its values if present. Emp Id should not come if no data available infromt of it

[Solved] Automate Quantity of any Items Using Excel VBA [closed]

As @BigBen said in the comments, it is down to your use of If…Else…If twice. The first correction is: If Result = True And Worksheets(“Sheet3”).Range(“C4”, Range(“C4”).End(xlDown)) <> “” Then Worksheets(“Sheet1”).Range(“C4”, Range(“C4”).End(xlDown)).Value = Worksheets(“Sheet1”).Range(“C4”, Range(“C4”).End(xlDown)). _ Value + Worksheets(“Sheet3”).Range(“C4”, Range(“C4”).End(xlDown)).Value ElseIf Result = True And Worksheets(“Sheet3”).Range(“D4”, Range(“D4”).End(xlDown)) <> “” Then Worksheets(“Sheet1”).Range(“D4”, Range(“D4”).End(xlDown)).Value = Worksheets(“Sheet1”).Range(“D4”, Range(“D4”).End(xlDown)). _ … Read more

[Solved] Handling pairs of pattern matching in multiple excel files through VB macros

Your setup as best I could understand it: And… This is the code I wrote: Option Explicit Option Base 1 Sub CopyData() Dim XLout As Workbook ‘Excel_Out.xls Dim XLin1 As Workbook ‘Excel_In1.xls Dim XLin2 As Workbook ‘Excel_In2.xls Dim ProductList ‘Product/Company List from XLin1 Dim ProductListO() ‘Concatenated Version of above Dim DataList ‘Product/Company List from XLin2 … Read more

[Solved] Make folders and files using excel vba macro and display with tree view and hyperlinks

I think that should do the trick. This macro will take folder path from cell A1 and list recursively its contents and subfolder contents with hyperlinks. Update: fixed, now it’s working. 🙂 Public Position As Integer Public Indent As Integer Sub ListFileTree() Position = 0 Indent = 0 Call RecurseFolderList(Range(“A1”).Value) End Sub Private Sub ClearFormatting(Rng … Read more

[Solved] Counting upward in column until blank?

I’m not 100% sure what you are asking. You say “sum the number” but do not specify if the number you want to sum is the number of rows counted or if you want to sum the value of the cells found. -Edit- Give this a try: This will start at the bottom row and … Read more

[Solved] Build hierarchy type presentation of data in Excel

Try this, it makes use of a temporary PivotTable… Option Explicit Sub TestMakeTree() Dim wsData As Excel.Worksheet Set wsData = ThisWorkbook.Worksheets.Item(“Sheet1”) Dim rngData As Excel.Range Set rngData = wsData.Range(“Data”) ‘<—————– this differs for me Dim vTree As Variant vTree = MakeTreeUsingPivotTable(ThisWorkbook, rngData) ‘* print it out next to data, you’d choose your own destination Dim … Read more

[Solved] Delete rows that DON’T meet VBA criteria

This will delete rows that don’t equal a whole number when divided by 50 Sub Button1_Click() Dim FrstRng As Range, Lrw As Long Dim UnionRng As Range Dim c As Range Lrw = Cells(Rows.Count, “A”).End(xlUp).Row Set FrstRng = Range(“A2:A” & Lrw) For Each c In FrstRng.Cells If Int(c / 50) / (c / 50) <> … Read more