• 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.

Recent content by vaskov17

  1. V

    Add every other column

    for odd columns: =SUM(IF(MOD(COLUMN(A1:D1),2)=1,A1:D1)) for even columns =SUM(IF(MOD(COLUMN(A1:D1),2)=0,A1:D1)) entered as an array formula CTRL+SHIFT+ENTER
  2. V

    How Do I Add A Print MsgBox Button (To A MsgBox)?

    VBScript code to print using notepad: Dim objFSO, objText, strText, strFile, objShell strFile=replace(WScript.ScriptFullName,WScript.ScriptName,"to_print.txt") strText="Test" 'message that should be printed Set objShell=WScript.CreateObject("WScript.shell") Set...
  3. V

    zero or no zero

    =IF(LEN(C1)>0,IF(AND(C1>=0,C1<5),A1,""),"") or =IF(AND(C1>=0,C1<5,LEN(C1)>0),A1,"")
  4. V

    Hiding rows after a check box is selected

    the code below assumes you have a check box called "Check Box 1" in "Sheet1" and hides rows 11 to 44 based on its value. You can create a Sub for each checkbox by right clicking on it, selecting "Assign Macro", then select "New". Sub CheckBox1_Click() Application.ScreenUpdating = False Dim...
  5. V

    Three Questions on Pyramids

    He means the two buttons in the funnel (pyramids) chart worksheet.
  6. V

    Calculate percentage of target achieved when target is a negative number

    If you are calculating percentage of target achieved, then the target has to be larger than the actual number and both should be positive. For this the formula is: =(Actual/Target)*100 If you have negative numbers, you can only calculate percentage change from actual to target. For this a...
  7. V

    Macros to Hide some worksheets in a workbook

    Not sure if the code below helps but it's one way of doing it. In the Workbook_Open event put a call to HideSheets to run the macro when the workbook is opened. Sub HideSheets() Dim choice As Integer Dim strList As String Dim ws As Worksheet Do Until choice > 0 And choice < 6...
  8. V

    Using a VBA to pull information from other sheets and then name the set

    Try this for making up the list: Sub MakeList() Dim ws As Worksheet Dim r As Integer Dim c As Integer Dim strRange As String r = 1 c = 12 For Each ws In ThisWorkbook.Worksheets If ws.Name <> "Summary" Then r = r + 1 Worksheets("Summary").Cells(r, c) = ws.Range("C5") End...
  9. V

    Auto-naming worksheets in a workbook under certain conditions

    To skip C5 if it's empty, change this line: If ws.Range("C5") <> "<>" Then to: If ws.Range("C5") <> "<>" and ws.Range("C5") <> "" Then
  10. V

    Same occurence and the time that elapsed.

    Can you post a sample of your data for which the formula doesn't work?
  11. V

    Same occurence and the time that elapsed.

    That might happen if you have two rows which have the same largest date.
  12. V

    Same occurence and the time that elapsed.

    =LARGE((IF(A:A=D1,B:B)),1)-LARGE((IF(A:A=D1,B:B)),2) the formula assumes all the unique ids are in column A, the dates are in column B and the unique id you are searching for is in D1 Should be entered as an array formula Ctrl+Shift+Enter
  13. V

    Writing inequality equations

    =IF(Stats!K37>=0.75,"Well Done",IF(Stats!K37<0.5,"Needs Improvement","Good Effort!"))
  14. V

    Having Trouble Hiding Entire Column (Please Help)

    Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim myRange As Range Dim lastActive As Range Set myRange = Range("A1:Z100") Set lastActive = Target.Previous If Target.Previous.Column <= 25 And Target.Previous.Column >= 5 Then If...
Back
Top