In sheet1 I have a simple database consisting of 5 columns of data
Column A : Name ie James Jones Column B : payroll number ie 123456 Column C : shift times ie 1245-2124 Column D : job title ie floor Column E : comments ie A/L or 0600-1500
what I would like is some code that will go down Column E and if a 'time string' ie 1300-2130 is found then copy this string and paste into corresponding value in column C. If a text string is found ie A/L or Sick or anything like this then ignore and move onto next cell, loop this until all cells in column E have been checked.
i have a string in a cell, that would say "Your results are -10% for the week". is there any way to change the font to red, for the number, including the minus sign preceeding it, and the percent sign following it. all are in one column, about a thousand rows. the rest can stay black.
Is there a way to format some particular colums so that when i enter my data into the cells i do not have to keep changing the caps lock to uppercase or pressing shift key which slow down my typing as i am not very fast typer.
i have a worksheet called 'week 1' and want to write vba code so that a new sheet called 'week 2' can be created. However i want to write code so that it doesn't matter what sheet i am on, a new sheet would be created with the name week and the next number up. ie. the last worksheet is 'week 7' then the code should be able to create a new worksheet called 'week 8' ect. I currently have this code but it keeps returning an error message. anyone know how i could do this???
Sub nSheet() Dim nm, i As Long nm = Worksheets(Worksheets.Count).name i = 1 Sheets.Add Do While WorksheetExists(Left(nm, Len(nm) - 1) & i) i = i + 1 Loop ActiveSheet.name = Left(nm, Len(nm) - 1) & i End Sub
I am using the code below to convert all input on the spreadsheet to UPPERCASE. This was working fine until I added a Column that contains dates (Column D is formatted like 03/Mar/2009). So when I type in 03-03 in column D I get: 03/Mar/2009 instead of 03/MAR/2009
Can the code be tweaked to accommodate the dates?
Private Sub Worksheet_Change(ByVal Target As Range)
'Converts ALL input to UPPERCASE
Dim cel As Range Application.EnableEvents = False
On Error Resume Next For Each cel In Intersect(Target, Target.SpecialCells(xlCellTypeConstants, xlTextValues)) cel.Value2 = UCase(cel.Value2) Next cel
This is wrekcing my head as I'm sure it can be done with an Array formula and I cant seem to get it sorted -
Say I have 5 Rows of text starting in A2 "A quick word" "A quick WORD" "A" "word" "WORD"
I need an excel formula to say "False", "False", "False", "False", "TRUE".
All conditions to be met for TRUE are - Word must in uppercase, Uppercase Word must be longer than 1 character, Sentence (i.e. cell) can not contain a space. This is the path I've gone down, but almost certainly incorrect -
I am trying to make a column of names appear in upper case (the first letter). I know about Upper(). I cant put that formula in this column because the names are typed there, (it would erase formula). How can I do this as well as have them alphabetically ordered?
I import a CSV file into Excel where the column title row has column titles that are just one long text string, without any spacing between the words. For example: CompanySiteDescription CompanySiteExternalSystemID IssueNumber
I would like a method (formula or macro) that would add a space-character before each uppercase letter (that's not the first letter in the string or an uppercase letter that directly follows another upper case letter). Thus: CompanySiteDescription becomes Company Site Description CompanySiteExternalSystemID becomes Company Site External System ID IssueNumber becomes Issue Number
I need to change the colour of a cell using VBA based on the input of a certain word. I have used teh below code but it doesn't pick up different variations of the word
Dim cell As Range For Each cell In Range("E2:E500") If cell.Value = "Check" Then[code]....
This code works fine (i have put it into worksheet change) when I use "Check and Mark and Chase" but some users are bound not to use capitalised first letters and on these occasions the cell colours are not changing.
How to add something to thie code above to make it work for any variation of capitalisation?
I have a button (shape) whose text value is linked to cell A1. (In other words, if text in cell A1 changes, the text on the button changes). A concatenation formula exists in cell A1 to "join" together a combination of text and cell values. The formula in A1 looks something like this:
="You have "&B10&" records that contain errors."
I'd like to set the font for the "&B10" portion to be a different color than the rest of the text string so that it stands out from the rest of the text. Obviously this can be done when the text is manually entered into a text box, but when using a formula to populate the text in the text box, it's all or nothing. I'm hoping to find a way to embed a separate font color within the formula string in A1 for just the portion I want to change? For example, all text would be regular/black, but the numeric value generated from cell B10 would be yellow.