• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Search results

  1. jassybun

    Changing a Row-Deleting VBA based on Department Number to a List

    Hello! I was wondering if would be possible to refer to a List in the second tab of a worksheet instead of including the specific numbers in the VBA as shown below. I have a long list of numbers that I need to put in this code: "If((@=76)+(@=77)+(@=82)+(@=85)" for a different workbook, there are...
  2. jassybun

    Pivot Tables sort

    I want to add additional code to sort all the tables (table1-table6) in descending order of the date (the second column in the 2 column pivot table) How can I add this in? Sub SaveAsValues() Dim WS As Worksheet ActiveWorkbook.RefreshAll Set WkShts = Sheets(Array("Overview", "Sheet1"...
  3. jassybun

    Save wrkbook in current location instead of specific path.

    I have a macro that saves the file in a specific drive location. However the drive is named differently on everyone's computer that has the network mapped (V vs X, et). So If I wanted to change this bit of macro to save in the same location as the original file which is always in the right...
  4. jassybun

    Macro that saves values for only certain worksheets

    I am trying to do a save as values in a copy of a report that I have. This works if I Dim as a worksheet, and it goes through all the worksheets. However, because I have pivot tables now in the first six tabs, this is no longer working. Instead I would like to do a save as values for 6...
  5. jassybun

    Add an additional criteria to code

    I also want to add "<>East" to the "<>West" so either condition would take into effect. How can I change the VBA below? With Sht2 If .AutoFilterMode Then .AutoFilterMode = False .Range("A1").AutoFilter 5, 82 .Range("A1").AutoFilter 6, "<>West"...
  6. jassybun

    Keep certain rows, Delete others

    I run the current macro in my report to keep all departments that are coded 76, 82 or 85. This macro takes out thousands of rows, which is perfect. Then I run another macro that adds department names based on a lookup list (not included). Now I need ta 3rd macro to go back and delete some more...
  7. jassybun

    Merging worksheets from different workbooks - values only

    Hello friends! I am trying to combine the line 12 on the first page of multiple workbooks in multiple folders into one worksheet, so I can total the data from line 12 of each initial summary page. Also, I need the values only. The formula in A12 is ridiculous I don't know why they set it up...
  8. jassybun

    Add message box to code

    In this sub, is it possible to make a message box to user to let them know what was "Not found" so they can add any missing items and run again? Sub Lookup() Dim Rng As Range Dim c As Range Dim result As String Set Rng = Range("c2:c" & Cells(Rows.Count...
  9. jassybun

    Keep only certain rows

    the code below works great with deleting columns not needed - but I also want to delete rows, and keep only ones where the Work Activity equals "76", "77", "82" or "85" Instructions: https://chandoo.org/forum/threads/posting-a-sample-workbook.451/ Sub DeleteColumnsRows() Dim Sht2 As...
  10. jassybun

    Headers for loops

    Hello amazing people, I am learning so much, thank you - I have another question - how to I add a header name to each of these loops? altogether I am creating 4 columns but they don't have header names. Instructions: https://chandoo.org/forum/threads/posting-a-sample-workbook.451/ Sub...
  11. jassybun

    IFERROR formula not working

    I have this formula and now that I am changing from PROPER(RIGHT(X25,LEN(X25)-10)) part to just PROPER(X25), it doesn't work old formula that works: =IFERROR(CHAR(149)&" "&IF(J25<>$J$13,TEXT(J25,"m/d/yy")&" ","")&PROPER(RIGHT(X25,LEN(X25)-10))&" - "&O25&" - "&PROPER(N25), "") new formula...
  12. jassybun

    Make Folder Macro - specify folder

    The code below creates folders in the right place, however, I also need to add a few more steps and I am not sure how to go about it. Based off the excel sheet, a folder needs to be created and sorted into the month folder indicated in the name in the cell value in Column R: Lastname Firstname...
  13. jassybun

    Adding a formula to a VBA loop

    Hello - I am trying to combine a formula to a VBA loop, to add a "yes" or "no" to the next column, c.offset(,13) =IF(D2-(C2+TIMEVALUE(L2)+IF(M2="PM",0.5,0))>1,"Yes","No") to Sub Lookup() Dim rng As Range Dim c As Range Dim result As String Set rng = Range("B2:B" &...
  14. jassybun

    Combining 3 columns: Date, 12 hour time and am/pm

    I am trying to combine 3 columns, column a: 1/2/2019, column b: 09:45, and column c: am/pm. Midnight would be 12:00, AM and Noon is 12:00, PM. I need to subtract it from another column which already has the date time in the format mm/dd/yyyy hh:mm:ss am/pm.
  15. jassybun

    changing set range to dynamic range

    I need to change this range in vba to go to the last row with a value instead of a set range: Sub macro() Range("H2:H10").Select 'specify the range which suits your purpose With Selection Selection.NumberFormat = "General" .Value = .Value End With End Sub something like this? Set rng =...
  16. jassybun

    Array formula - multiple criteria

    I want to add another option to include besides "DAY" , like "NIGHT" and "EARLY" in the formula below, like this: (Conv!$L$1:$L$5000={"DAY", "NIGHT", "EARLY"}), but I cannot get it to work - I think this is because I have another multiple option in the same line: ={"1 - Over","2 - Under"}), How...
  17. jassybun

    adding array to a loop

    this code works -but I have multiple text words that need to be red in addition to "late". How can I add more words? Public Sub ChgTxtColor() Set myRange = Range("A25:A100") 'The Range that contains the substring you want to change color substr = "late" 'The text you want to change color...
  18. jassybun

    Add array to loop

    this formula works -but I have multiple text words that need to be red in addition to "late". How can I add more words? Public Sub ChgTxtColor() Set myRange = Range("A25:A100") 'The Range that contains the substring you want to change color substr = "late" 'The text you want to change...
  19. jassybun

    vlookup loop for a string

    I am trying to edit a code I found online, but having an issue every results is "NOT FOUND!" which isn't possible - I think it might be because the value is a string? Sub CategoryChanger() Dim rng as Range Dim r as Range Dim result as String '## Define a range to represent the cells over which...
  20. jassybun

    Changing a vlookup to a index/match that uses array

    Original formula: =IF(IF((VLOOKUP(E2,Status!A:B,2,FALSE))=0,"ACTIVE",VLOOKUP(E2,Status!A:B,2,FALSE))="N", "LOA", "ACTIVE") This doesn't work, gives me an n/a. I believe because it is referencing a cell that has an array in it...
  21. jassybun

    Reference a Vlookup cell

    I am trying to reference an array formula result in another column, but I get a N/A error =IF(IF((VLOOKUP(F3,Status!A:B,2,FALSE))=0,"ACTIVE",VLOOKUP(F3,Status!A:B,2,FALSE))="N", "LOA", "ACTIVE") whereas F3 is: =IF(ISERROR(INDEX(LTI!$A$2:$R$988,SMALL(IF(LTI!$B$2:$B$988={"05- SERVICES...
  22. jassybun

    Formula - {} within an IF()*()

    I am trying to add a {} statement, to be more specific in this, but it creates an error, what am I doing wrong?? Maybe there is a better way to do this?: IF(ISERROR(INDEX(Data2!$A$1:$AX$1000,SMALL(IF(((Data2!$H$1:$H$1000="SERVICES US")*{Data2!$AB$1:$AB$1000="3 - Option","4 - Option})...
  23. jassybun

    SMALL and IF and OR functions not working together

    I added an "OR" FUNCTION and now the formula no longer works correctly. It instead brings up every value, almost like its not even there, instead of filtering the only two I need. Any help is greatly appreciated! =IF(ISERROR(INDEX(TAW!$A$2:$L$988,SMALL(IF(OR(TAW!$B$2:$B$988="10-INTL TRADE...
  24. jassybun

    Report that splits networkdays into monthly columns but maxs out at 40 days

    *file is attached* The green columns actually work, but this isn't the end product that I need, but its a start I guess. Each event has a start date and end date, and I split up the days (network days minus holidays) but they can only be charged a max of 40 days. The report will only show the...
  25. jassybun

    SUMPRODUCT of result of formula

    =SUMPRODUCT((A$8:A$1000=6002)*(AD$8:AD$1000="Refer to ODSE")) I am trying to get a count on cells in my AD column for a specific area (6002 in this case) that has the words "Refer to ODSE" in it, but unforunately, the formula gives me a "0" even if there is a row that in the AD column has...
Back
Top