boolean

  1. S

    Time/Date Stamp based on Boolean Value, Formula only.

    Hi Folks, I have a table with upwards of 1000 entries on it and multiple people will be working off this file (not at once). The idea is simple, you check a check box and it adds a time stamp into the "Sent Date" column. Each box is linked to the neighboring cell. However using the NOW() or...
  2. D

    How to put countif function into array formula?

    Good afternoon all. We are trying to count and sum the monthly payroll for all employees #1,#2, etc. up to a certain count (in the example below, 7). Essentially, we need all the Boolean answers (see formula) to be in a sequence and then for an array formula to spit out a sum (and count...
  3. E

    Public variable value not being shared by other modules

    Hi guys. I'm fairly new to VBA and I'm having a small problem here. On a certain project I'm working on I have declared a couple of public Boolean variables. The value of this variable is consistent inside the same module, but if for example I change the value of Public x as Boolean to True in...
  4. F

    problem with VBA that checks a true false value in a cell from another xlsm file

    Hi All I have two files : A and B. I am writing a VBA in file A that generates some value and writes that in a cell in file B. in file B macro, there is a Function F and there is a cell in which a formula written that used this function F that generates a True or False value based on the...
  5. T

    Boolean set first cell check if data then got to next cell

    Hello, I would like to find the code to set a start cell to check if there is a number in it, if not check next cell in the row? Example sometimes the source data is in BL3 and others its BK3. so if I can set a short loop it might solve an issue. ws2.Range("A1").Value = ws1.Range("BL3").Value...
  6. T

    Image in Footer via VBA

    Hey guys, I hope you can assist me... I am trying to protect a document by having a particular footer appear every time a person saves. I have to make multiple versions of the document for different people and am battling to the get the image to change per saved version. I, by the stroke of...
  7. L

    If cell is Empty!

    Hi all, I am trying to check for all sheets if specific call E10 is empty and it prevents user from saving. Currently it is only working on the sheet that i am on. It does not work on the others, i want to make it that it checks all check for a specific cell before saving. This is currently...
  8. L

    example using boolean

    Hi I understand how boolean variables work. However, I am looking for a simple code that use boolean to understand it better or to see how it is used really. I created the code below but to me that does not make a lot of sense, I have seen this example on the net. Sub myboolean() Dim...
  9. F

    VBA: Add period to end of sentence

    This works well, but curios, can this be done without looping? Such as with Evaluate? SubAddPeriod() Dim c As Range For Each c In Range("C8",Range("C" & Rows.Count).End(xlUp)) If PeriodExists(c) <> True Then If Len(c) > 0 And Right(c, 1)<> "." Then c = c & "."...
  10. B

    Return Multiple Values from IF Statement

    Hi Commnity, I have a formula I am trying to compile to return to me with who's anniversay date it is from a range of employees and their corresponding hire dates. I know that a IF statement generally works to find the first TRUE logical evaluation and then stops, but if there are multiple...
  11. B

    Easy VBA Loop Through Variables Looking for Boolean Flag

    Hi All, I'm attempting to write a code that looks through a potential of 50 different Boolean variables and creates a new variable "YES" if at least one is flagged yes. I am extremely new to VBA and just know basic loops. Any help would be appreciated. Thank!
  12. M

    Infinite save prompt loop on close

    I'm using the following macro to suppress messages about there being things within the workbook that the document inspector can't remove. It works but when closing the file it enters an infinite loop of saving and then prompting me if I want to save changes. How could I exit this loop after...
  13. Dazzawm

    Change Part Of Before Save Code In Bulk?

    I have loads of files that have a before save code within them. I need to change the location, is it possible to change part of the code without opening them all individually? This is the code Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If...
  14. C

    More convenient way to return text with Boolean?

    I’m trying to avoid lengthy IF() formulas by using Boolean operators. Is the a more convenient way to return a text string from a cell based on a True/False result that doesn’t involve an IF function? Numbers are easy because you just multiply them by the true/false result.
  15. P

    Update UDF for Win 10

    Hi folks I have a simple UDF just to compare text files and highlight any lines between the two that do not match, it simply runs the basic DOS file compare function but just simplifies the usage. Just had my work pc upgraded to Win 10 (Yep... just), and now find that this doesn't work any more...
  16. R

    OptionButton: Boolean vs Long, and why -4146?

    Hi Folks, I've been doing some reading up on the Multiple UserForm Controls with One Event Handler concept, and a few questions have arisen... :confused: Some (most?) of the articles I've read talk about using Long variables vs. Boolean to hold the value of OptionButtons & CheckBoxes. The...
  17. J

    Best Practices When Coding Multiple Buttons Performing Similar Actions

    Wowza, Wasn’t sure what was the best way to word my question. I’m currently working on a code that transfers dates from an excel sheet into a webform and selects a specific export button on the website (just pulling reports essentially). Each button pulls a specific report. So there’s a need...
  18. JenniferMurphy

    Boolean values are numbers sometimes?

    It appears that Boolean values (TRUE, FALSE) can be used in calculations in some situations, but not others. In this table, Col D shows the formula in Col C. <tbody> R/C C D 4 FALSE C4: FALSE 5 TRUE C5: TRUE 6 TRUE C6: TRUE 7 #DIV/0! C7: =AVERAGE(C4:C6) 8 0 C8: =SUM(C4:C6) 9 2 C9...
  19. W

    Prevent saving workbook

    So I thought if I placed this code into the Workbook Module it would prevent the workbook from being saved or saved as. What did I miss? Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.DisplayAlerts = False ThisWorkbook.Saved = True...
  20. K

    Boolean test for dependency between 2 cells

    How can I test whether one cell is dependent on another? I tried the following, but does not seem to work: Function Depends(Cell_B As Range, Cell_A As Range) As Boolean If Not Intersect(Cell_B, Cell_A.Dependents) Is Nothing Then Depends = True Else Depends = False End Function
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

This Week's Hot Topics

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top