Format Cell Via Check Box Value/State
Apr 15, 2008format a cell depending on the state of a check(tick) box
View 3 Repliesformat a cell depending on the state of a check(tick) box
View 3 Replies1 - If any cells (with data in it) in the "state" column contain any of the following abbreviations in it...
AB, BC, MB, PE, NB, NL, NS, NT, NU, ON, QC, SK, YT
Then all matching row cells in the column named "country" should say "Canada",
AND....(it must also meet this criteria)...
Criteria 2 - If any text in "Country" column is "Kryponite", AND "State" column is blank
If BOTH criteria 1&2 are met.....THEN...
then delete both the country & state columns
If not, keep both columns and highlight in light red any errors to this macro.
I'm trying to create an array formula that returns all the cities in a given state by imputing the state's abb in cell K2. The returned cities go into column J. California has the most cities(430) and the cities are 5000 rows deep.
View 7 Replies View RelatedMy company uses 4 types of barcodes 8, 12, 13, & 14 number barcodes for our products my problem is that I can't figure out how to force the barcode to format properly no matter how somebody enters it if they don't use spaces or put them in the wrong spots, I can't use custom formats because there is 4 different layouts
8 digit should be "#### ####"
12 digit should be "###### ######"
13 digit should be "# ###### ######"
14 digit should be "# ## ##### ######"
these barcodes are in columns L, M, & N also right now 'm using a formula in another cell to verify the barcodes by calculating the check digit and comparing it to the check digit typed the formula i'm using is
Depending on the text entered into one cell, I'd like another cell to state n/a. For example, if cell a2 shows the text of cash, then cell b2 would show n/a.
View 3 Replies View RelatedI'm playing with an excel file that has 3 different spreadsheets and basically the same layout just different product lines on each sheet. I need to find a snipet of VB code to change cell color depending on if another cell is used(filled in) or if it is blank. I'm very limited to my VB skills but can tinker enough to get what I need if someone points me in the right direction.
here is an example of what I'm trying to accomplish using the following Columns:
ItemNo[A], QUOTEREQUESTDATE[b], SUBMITTOSALESDATE[C] APPROVALRECEIVEDDATE[D], RELEASETOMFGDATE[E]
EXPECTED RESULTS TO CHANGE CELL[A] COLOR TO RED CELL:
[b] USED, [C] BLANK, [D] BLANK, [E] BLANK
EXPECTED RESULTS TO CHANGE CELL[A] COLOR TO ORANGE CELL:
[b] USED, [C] USED, [D] BLANK, [E] BLANK
EXPECTED RESULTS TO CHANGE CELL[A] COLOR TO YELLOW CELL:
[b] USED, [C] USED, [D] USED, [E] BLANK
EXPECTED RESULTS TO CHANGE CELL[A] COLOR TO GREEN CELL:
[b] USED, [C] USED, [D] USED, [E] USED
I want to write code for a Checkbox that when checked it fills a cell with a color, but if it is subsequently unchecked, the cell color disappears.
View 9 Replies View RelatedIn one excel file, i have a date , and i set this to "dd/mm/yy hh::mm am/pm" format. From another file i will open this file and i need to copy that date to this file. My question is , before copying i need to check it is in the "dd/mm/yy hh::mm am/pm" format using vba.
View 9 Replies View RelatedIn my spreadsheet the user has the option to put in a numerical value into different cells, which will update (add to) another. So if we have an initail value of 20 in "I10" and the user puts in 20 in "W12", then I10 will display 30.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("W12:X24")) Is Nothing Then
Select Case Target
Case Is = Range("W12")
Logbook.Show
Range("I10").Value = CInt(Range("I10").Value) + CInt(Target.Value)
Case Is = Range("X12")
Logbook.Show
Range("J10").Value = CInt(Range("J10").Value) + CInt(Target.Value)
Case Is = Range("W13")
Logbook.Show.................
Is it possible to check the conditional state for a specific condition for a specific cell.
For example a cell has 1 or more conditions.
A condition will toggle to a condition if true or false etc.
The specifics is i use red (color 255) if a cell has not met a specific condition (of 1 or more conditions)
So if the cell is mandatory to be populated, and is blank, it will be red, if not it will be something else.
But i want to loop all visible cells with conditional formatting, and where the cell has a condition when true will show interior color = to 255 return the cell address.
To msg the user where data entry is still required etc.
i have an excel spread sheet (2010) that contains city, st and zip in one cell. i need to separate these into 3 individual cells. My problem is the some of the cities are one, two and sometimes 3 words so using a delimiter of space will not separate them correctly.
View 4 Replies View RelatedCheck and format some data. I have 100,000+ rows so kinda need a macro to do it.
I have data like this
Sheet1 Â ABCDEFG1start_date start_time end_date end_timeTypeSOC Before SOC After
208/01/201218:36:2008/01/201218:40:00TÂ Â 308/01/201218:45:1208/01/201218:50:44TÂ Â
408/01/201218:52:1208/01/201219:50:46C3446508/01/201219:54:2708/01/201221:44:40C
[Code] .....
I'm trying to merge all the "C" rows in Column F into one row, like this:
Sheet1 Â ABCDEFG14start_date start_time end_date end_timeTypeSOC Before SOC After
1508/01/201218:36:2008/01/201218:40:00TÂ Â 1608/01/201218:45:1208/01/201218:50:44TÂ Â
1708/01/201218:52:1208/01/201223:02:00C341001809/01/201208:16:5109/01/201208:44:08TÂ Â
1909/01/201208:45:1109/01/201208:49:55TÂ Â
So you would just keep the first row,but replace the 'end date' and 'end time' with the 'end date' and 'end time' from the last row and same with the SOC.
I have data in Row 53 that spans 7 columns, but stays in the same row. I want to design a loop to select every 7th cell in that row and check if it is empty. If not, add onto a "counter" then display the final number of occupied cells (the value of the counter) at the end. This is what I have so far, but I get all sorts of errors.
Code:
Sub Tester()
Dim WB As Workbook
Dim WS As Worksheets
Dim modCounter As Long
Dim Cell As Range
Set WB = Workbook("Transverse Series.xlsm")
Set WS = WB.Sheets(BM18)
[Code] ......
I am trying to improve my expense report template and need to check on the load if expense report number has been loaded correctly as well as if this report has been previously loaded. Expense report number format looks like this: AAA-BBBBBB-CC
Where:
AAA – Employee ID #
BBBBBB – End of the week date
CC – Weekly expense report number
For instance, 023-122008-01 means: Employee number 023, week ending date 12/20/2008, weekly expense report number 01. I would like to prevent/give warning of loading incorrect expense report number format, check for possible duplicates, and check if trying to load expense report belongs to the right person (by simply matching previously loaded in different cell of the same sheet employee ID and first three digits of just loaded expense report number. I think I know how to do all of these separate, but have no idea how to combine all three checks for one cell.
What would be the correct formula to check the format of an address that must start with a number followed by a space then text - in cell B4
At the moment I have:
=IF(B4="","r",IF(ISERROR(SEARCH(" ",B4,1)),"r",IF(ISNUMBER(VALUE(LEFT(C5,SEARCH(" ",C5,1)-1))),"a","r")))
If it is incorrect or missing an 'r' should be displayed, an 'a' if correct
i will receive same data from two different persons in different format. By right, the data should have the same total. However, it was not.
I have attached a file that contains two worksheets with simple example to illustrate what i meant. May i know which is the effective formula to detect the mistake?
I am trying to generate a sub that read the name of a check box (which is in text format) in a spreadsheet in this case sheet13 and according to that ask if that check box which is in another sheet (sheet4) is true or false, I mean if it checked or not, then perform other actions
But I am getting this following error
Run time error ‘438’
Object doesn’t support this property or method
I tried several things but always get an error.
Does some body know how to make the checkboxname variable a valid name for the checkbox object in sheet4?
I have a worksheet that I want to format based on three different cells. I had it set up with the following:
Code:
For i = 2 To LR
If Cells(i, 13).Value = "Price Mismatch" Then
Cells(i, 1).EntireRow.Interior.ColorIndex = 39
[Code] ........
Worked fine until one of the cells had an error in the result, I want to have this row colored also. I altered the first check to :
Code:
If Cells(i, 13).Value = "Price Mismatch" Or IsError(Cells(i, 13)) = "True" Then
I have tried multiple variations without success. I need to have the row colored if the value in the cell on the row in column 13 = Price Mismatch or is an error.
I have employee numbers in two ranges of cells where the employee number will have alpha and numeric (ASAZ002000). The first is a range of “target” employees we need to look at.(A4:A20). The second range will be all employees of the company that the target list needs to check in for the specific target employee(s).(G4:G25). If a “target” employee is found within the range of all (G4:G25) – highlight cell red (G4:G25). I have attached a small file that might explain it better.
View 2 Replies View RelatedI need to get the state (xlon or xloff) of check boxes on a worksheet. i have tried the following but unable to get it to work.
View 3 Replies View RelatedI have a spreadsheet that is used for sales territories. In column A, I have customer names, in column B, I have the State abbrev., In column C I would like to return as salesperson's name based on the State.
Aco IL John Smith
ABco OH Jane Doe
Cco WI John Smith
Czco IL John Smith
Dco WY Adam Scott
Fco UT Adam Scott
FDco CT Bill Jones
etc WI John Smith
So I need a formula to enter in column C, that will return the correct salesperson based on the state in column B. (when auto filled down)
For example: IL,WI,MN,IA,ND,SD = John Smith
OH,PA,KY,MI, = Jane Doe
etc
I've got a list of numbers between 0 and 1
eg.
0.25
0.59
0.73
0.15
0.99
in column A
if I want column B to state "low (0.00-0.33), medium (0.34-0.67) or high(0.68-1.00)" for a corresponding value in column A, how would I do that?
Our state carries a 4% sales tax on all items except food and prescriptions.
Our county carries a 3% sales tax on everything.
Attached on my work sheet:
Column "C" determines if an item is either food or non-food.
"G5" is the subtotal of column G
"G4" is the S/tx on "G5" at 3%
"G3" is the S/tx on "G5" at 4%.
"G2" is the gross pay out.
My question is:
I'd like a formula for Cells "G3" and "G4" that can determine which items paid for in column "G" match a "N" or an "NF" in column "C".
If an item in column "G" represents a "F" in column "C", then there should not be anything in cell "G4" If an item in column "G" represents a "NF" in column "C", then there should be a figure in "G3" & "G4".
to automate a process that split name, address, city, state, and zip.
here are the examples of name, address, city, state, zip that i would like to be split in each column. this is difficult because the datas are not consistent and not predictable in how it WILL BE GIVEN....
Are Boolean variables ALWAYS initialised as FALSE when they are created?
I am wanting to leave a 'marker' in a function so that I know whether it is the first time it has been used or not. Something similar to this:
I believe many people face is to automate a process that split name, address, city, state, and zip.
here are the examples of name, address, city, state, zip that i would like to be split in each column. this is difficult because the datas are not consistent and not predictable in how it WILL BE GIVEN....
I am looking to create a macro button which will reset the sheet to its original state.
I have locked the cells users should not imput data into, and unlocked where they add their data.
At the end of every school year, they will need to be able to reset ALL the workbooks back to their original state with all the reference formulas.
I am thinking I will need to tell the macro to create a hidden copy of the workbooks and then upon hitting reset it will use the backup to override the current. But they will need to be able to reset at the end of every year.
I would like to have one reset button that resets ALL the workbooks at once, but if not, I could put a reset button on each workbook.
As I have just started my VBA training, I have a code that will create a backup and hide it, but I have no idea how to do the reset portion. And again, since they need to be able to reset it each year for x amount of times, I don't know how to get it to keep having a fresh backup and get everything to its original.
Upon initial display,if my toggle control value is True, I would like it to appear "selected", or down. If the initial value is False, I would like it to appear "deselected" or up. Even though I can successfully detect the state and set the color and caption, the control always appears up, as though it is not selected.
Private Sub UserForm_Initialize()
If AppInfo_Form.debugToggle = True Then
AppInfo_Form.debugToggle.Caption = " Debugging Is ON"
AppInfo_Form.debugToggle.BackColor = &HFF00&
Else
AppInfo_Form.debugToggle.Caption = "Debugging Is OFF"
AppInfo_Form.debugToggle.BackColor = &H8000000F
End If
End Sub
I would be loading data into a spreadsheet, and when there is a phone number I'd like to have it populate the state field. (ex. (212) 123-1234 in the phone field, would populate "NY" in the state field, is this possible? If so is there any brief way to describe how to do so without taking too much of your time?
I have a column that has data like this in it:
cityname, stateAbbreviation, XXXXX
or
sacramento, CA 95814
The tricky part is that sometimes there's a comma delimiting these fields and sometimes there is just a space between these fields.
So, I suppose the script would have to assume a length of 2 chars for the state and when it finds that it knows that what was before that string of 2 chars was the city.
Also, sometimes there is a longer zip with 10 digits code like this:
cityname stateAbbreviation XXXXX-XXXXX
sacramento CA 95814-82202
How might I write some VB code to loop through this column and break up this cell into 3 other cells?