Function To Recognize Format
Sep 23, 2009I need a function who can recognize the format below and return TRUE or FALSE. See example.
View 5 RepliesI need a function who can recognize the format below and return TRUE or FALSE. See example.
View 5 RepliesI am importing from another program into Excel. Anytime I have a time in a column with a 0 in the 2nd hour place it will not add that time in. Example (05:21:32)
A1 10:20:12
A2 05:12:15
A3 10:15:12
Total= 20:35:24
How can I get excel to recognize a time in this format with a zero (05:34:23)?
I'm trying to make a macro to replace dates with a certain value with blanks, but it dosn't seem to work.
Here's my code:
Sub Datetoblank()
'
' Datetoblank Macro
'
'
Cells.Replace What:="2014-05-08 15:09:25", Replacement:="", LookAt:= _
xlWhole, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Basically I have a phone number in column A:
123-456-1234
In column B, I want it to show me the first 3 numbers from the left, (so 123)
So I do =LEFT(A2,3)
Which gives me 123, but it's displayed as text, which ruins my whole formula that looks up the area code and displays the state.
I googled the problem and found http://exceltip.com/st/Make_LEFT_Fun...umber/778.html
which tells me to do:
=IF(LEFT(A1,1)=1,"Ignore",A1) [sees 1 as a number]
=IF(LEFT(A1,1)+0=1,"Ignore",A1) [sees 1 as a number]
=IF(LEFT(A1,1)="1","Ignore",A1) [sees 1 as text]
but when i try that it just displays the ENTIRE phone number: 123-456-1234
I can only export vendor codes from the General Ledger rather than vendor names. If possible, I would like for excel to recognize the vendor code and assign the appropriate name. For example, HCC stands for Human Capital Consulting. The GL includes the vendor code and the voucher number. If I export the vendor code HCC/V0007 from the accounting system to cell A2 in excel, I would like for excel to pick up everything before the / (in this case HCC) and enter Human Capital Consulting in cell B2. I have a vendor list in excel that matches vendor code with vendor. I just need for cell B2 to pick up the vendor code from the list.
I have a forecast which is sorted by product code by week vertically. I need to create a lookup to re-format this information into a horizontal format by week. I have started this by transposing the information as my attachment shows but I am hoping there is a lookup formula which will be easier and quicker. I have attached the actual document and the data I want to sort is Sheet 2. I have started in Sheet 1. I want to look up the code in column A, then lookup the week number which would be B2 in Sheet 1 and return the value of that Code in that week from Sheet 1.
View 2 Replies View Related1) My data is $42,397.40 is there a way that I can format for it to read $42.4?
I tried ROUND function and that did not work.=ROUND(A1,-3)
2) Cell A5 is Data:1/14/09 - 1/14/09. Since I only wanted the date, I used this formula =RIGHT(sheet1!A5,LEN(sheet1!A5)-FIND("-",Sheet1!A5)) which gave me 1/14/09. I need to set the format to look like 1/14/2009 but the data function would not recognize..
I want to apply conditional formatting in a cell based on the contents of another cell. I can do it if I just want it based off 1 condition (=b151="sample") but would like to if it met 1 of a couple possibilities.
For example, cell H151 I would like to fill green if cell B151 contained the text "sample" or "example". B151 has a list box with about 10 possibilities but I only want a few of those to turn H151 green.
I need a formulat that will ensure that a cell has 12 numeric characters,a dash, and then 3 more numeric characters. I thought this was a simple formula but I cannot get anything to work.
############-###
I am trying to format this function to just return the year, but I can't seem to get it to work. It just returns the full date and all I need is the year.
DateAdd("yyyy", -1, Date)
when ltoj is less than zero the following code enters a period in the cell instead of zero.
If ltoj < 0 Then ltoj = 0
Cells(r, 10) = Format(ltoj * 24, "##.##") 'writes data in correct format
I am working on a spreadsheet that deals with times such as a work schedule, how every the schedule cells are in a time format, and my if function will only return "check"(which is false). my code works if it remove the time formatted cells but i want to keep the document in its orginal format.
=IF(Mngmt!F16="PH","",IF(Mngmt!F16="OFF ","",IF(Mngmt!F16="VAC ","",IF(Mngmt!F16="8:00:00 AM", "MIKE", "CHECK"))))
The bold and under line portion is where my problem is at.
Its looking to the mngmt tab to find f16 when it equal 8:00:00 AM (scheduled time in time format) but returns ""check"(false).
I have bunch of data in the first column but there is always an identifier in this data at different location within each cell of the column. I am thinking the best way is to use the Find function. If true, then format the whole row.
For example: starting in row 10, I want the macro to look in A10, find "AFL" and if "AFL" is found in A10, then format row 10 by highlighting it yellow. Otherwise, highlight it red.
Var1 is a number, for example (3.2354896), displayed on the worksheet as 3.2
Var2 is a number, for example (3.958846), displayed on the worksheet as 4.0
Var3 is text, for example (lunch program)
BullPoint = "greater satisfaction with Var3 (Var2 vs. Var1)"
Range ("A1") = Application.Substitute(WorksheetFunction.Substitute(WorksheetFunction.Substitute(BullPoint, "Var1", Var1), "Var2", Var2), "Var3", Var3)
The result of this is now:
greater satisfaction with lunch program (3.958846 vs. 3.2354896)
What we want to see is:
greater satisfaction with lunch program (4.0 vs. 3.2)
without losing the ".0" for the 4.0, which happens if we adjust the original data, using ActiveWorkbook.PrecisionAsDisplayed. Our preference is not to use this command, as it changes source data.
I have two worksheets which talk together and one of them gives a time stamp using some VBA code
=format(Now(),"dd/mm/yyyy AM/PM"
in the other spreadsheet I have the Now() function which has been working fine. However, when another user went into the spreadsheet went in it, my calculations between the two dates now error. I am presuming its because of the now function not having some formatting defined so is there anyway of changing this value? The cells-formatting will not obviously work as excel is getting confused between the two time types even though the format looks fine. To help the calculation that is messing up is
=IF($L7="","N",IF(DATEDIF($L7,$J$1,"d")>10,"N","Y"))
whereby L7 is the imported timestamp and J1 is now(). The calculation is to show which accounts become inactive after 10 days.
After reading up on the internet I know that to get round the problem I have to make sure that everyone is using the same regional settings. But I just have a couple of questions:-
1. I can understand the date calculation not working on the other persons machine, but when I went back to look at it I was getting the same error. Even though the file is shared, how come my settings didnt 'overwrite' and how come i was affected?
2. Is there a way to make the code work regardless of who opens it in whatever region? Im not sure if there is a fundamental problem but I cant rely on everyone having the same settings because I know that this will cause problems in the longterm.
3. Using the formuale Now(), is there no way of forcing that to a uk date format to stop the errors?
I have created an excel addin, the purpose of which is to run a piece of code attached below in code section, which iterates to each cell of excel and remove merged cells. I am getting a very basic error as my addin is not able to recognize the workbook which is opened and it returns Nothing for ActiveWorkbook object....
View 9 Replies View RelatedI have a workbook that I am working with and I need to formatting the cells so that they will have multiple formulas and I am not sure how to make it work.
Sheet1 Column A is titled 'accounts'. There are 2700 rows under Column A that are being used. Column A is already formatted with a Vlookup formula so I can't add another formula in these cells.
What I need to do is highlight many ranges of these 'accounts' cells depending on their account numbers. I need to input this formula in a separate location on the spreadsheet. For example; If 'accounts' is >=110031100000 AND <=110031100099 then highlight those accounts in 'RED'. and If 'accounts' is >=1200454000000 AND <=120045400099 then highlight those accounts in 'green' and so on...I am not sure how to word the if statement. The formula must reside in column D or greater and not in A.
Am I going about this the wrong way. What I am trying to do is isolate the cells (accounts) that I have referenced on another worksheet so that I can visually notice any accounts that may have been excluded.
There is a spreadsheet I use at work where we are told to use an apostrophe before the date to prevent the function bar from converting the dd/mm/yy to dd/mm/yyyy. Why does the apostrophe do this?
View 4 Replies View RelatedI have some codes that require different values when running under xl2003 vs. when running under xl2007.
View 11 Replies View RelatedAny recommendations on vlookups being able to recognize a value that does exist within a table? It returns an N/A and the formatting is the same for both references.
View 9 Replies View RelatedI am trying to write a macro for excel, deleting columns of #N/A generated in a text file. I'm having a hard time identifying the #N/A in the cell. I've tried
If Cell.Value = "#N/A" and tried if IsError("A1").
I am trying to filter data in one sheet depending on a variable in another. But even though I have the same formatting in both sheets it will not recognize the number. I have tried everything from pasting values, to pasting the same formats in both areas, using the F2 option, but nothing seems to work. My single value is in Sheet1 B2. The rest of the data I'm filtering is in Exceptions2 with the filter criteria residing in column A. I have headers in row 1.
Sub Recall_BT()
Sheets("DataEntry").Unprotect
Sheets("Exceptions2").Visible = True
Dim rr As Range, r1 As Range
Dim r2 As Range
Dim r3 As Range
Dim rCell As Variant
rCell = Sheets("Sheet1").Range("g3")
Dim sh As Worksheet
Dim wsCopyTo As Worksheet
Application.ScreenUpdating = False
Set sh = Worksheets("Exceptions2")
sh.Select
sh.Range("A1").CurrentRegion.AutoFilter Field:=1, Criteria1:=rCell
Set rr = ActiveSheet.AutoFilter.Range
Set rr = rr.Offset(1, 0).Resize(rr.Rows.Count - 1, 1)
On Error Resume Next
Set r1 = rr.SpecialCells(xlVisible)
On Error GoTo 0...................................
I am having trouble creating a formula to help me recognize the 4 cells that I have.
On C1, I need this cell to identify the numbers in E1, F1, G1, and H1.
On E1, F1, G1, H1 each of the cell have a number.
If all the cells (E1,F1,G1,H1) have a digit, does not matter what number it is, than C1 would automatically place "ABCD" and in white.
E1 = A
F1 = B
G1 = C
H1 = D
any time a cell has a digit, then C1 would tell me which of those cells are used with A,B,C, or D.
In the given example below how can i recognize the last number which is LV-00010 and after recognizing the last number i wanted to add 1 so the next number will be LV-00011 (im using this as an automatic ref. no.).
LV-00007
LV-00004
LV-00010
LV-00008
LV-00009
LV-00001
LV-00002
LV-00006
LV-00003
LV-00005
I realize there are a number of threads on this topic, and I've read through them but have been unable to apply those answers to this problem. I've attached a sample of the worksheet in question. The worksheet is supposed to tell me if messages are supported via a certain Network (BFX).
Column A is the result of a VLOOKUP function, which returns Yes or No if the entry is found, or #N/A if the entry is not found. Column B is my attempt to translate column A into strictly "Yes" and "No", converting an #N/A into a "No". For some reason, the ISNA( function I'm using doesn't seem to work, as highlighted in row 18.
I have an order tracking sheet that has start times in column B, end times in column C and the processing time in column A. The start and end times are recorded in ddmmyy hhmm format (9/1/09 13:30).
On another sheet I have dates listed for each workday. Next to these dates I am wanting a formula/macro that will traverse through column B and provide the number of orders and average processing time that match this. I also plan on recording the shortest and longest processing time next to these.
I saw there were codes to sum or count cells that have a specified Fill Color
http://www.ozgrid.com/VBA/sum-count-cells-by-color.htm
However it says the changing of a cells fill color will not cause the Custom Function to recalculate, I really need to recalculate the data if there are any changes in the selected range
=SUMIF($A$2:$A$9,F2,OFFSET($C$2:$C$9,1,0))
It works great.
The issue is that the information (time) that I import into excel doesn't show as information if there is a zero in front the amount of hours. I can physically see the information but have trouble using it. For instance if I add
(A1) 05:25:25
(A2) 10:25:25
(A3) 02:25:25
If I total/SUM this my total is 10:25:25. It will not recognize anything under 10 with a first digit as a zero. So for me to add this I use:
=SUMPRODUCT(B3:B25+0)
This also works great. Now on to my issue.
I am using the 1st formula to grab data i.e. (A1). It will not recognize that as anything. It comes up as zero. I can't figure out what to add to the 1st formula for it to recognize the info.
The issue: Theres about 300 rows of data arranged in multiple columns. One column has a dollar amount and another column has a code. Data gets entered into the sheet periodically so every new dollar amount needs to be transferred to another sheet by recognizing the right code.
What I want to do: I want excel to recognize the dollar amount and attribute it to the code in the same row. Then sum and transfer that amount to another sheet and if possible add it to an existing amount the in the correct cell.
The final outcome should be that any user of the document can just copy and paste data into one sheet and the document automatically generates the costs in another sheet. And if possible every dollar amount should be linked to a code so a user can just click on the amount and see where it came from and under what code it falls under.
How can I make excel to recongnize this: 123456- as a negative number?
View 7 Replies View Related