Macro Not Working Properly For Conversion Of Date Format?
Apr 13, 2014
In the attached sheet, one macro is developed which is not working properly. My req is to convert date from dd-mon-yyyy to yyyy/mm/dd format. (23-jan-2010--> 2010/01/23)
If incomplete date is there, then hyphen should place the gap i.e.
For date like APR-2014------> Output should be 2014/04/--
For date like 1998 -----> Output should be 1998/--/--
The below macro works only for row number 11, 15 and 16.
[Code]....
Attached File : date.xlsm
View 5 Replies
ADVERTISEMENT
Jul 13, 2006
I've been working on a particular spreadsheet and I've just noticed that
double clicking the format painter will only format one cell. It won't
retain the format to be put into the next selected cell which it should when
its double clicked. The same goes for copy and paste. Normally once you've
copied something you can paste it into a number of cells individually, one
after the other, but after the first paste selection, the paste option is no
longer available. I can't see any settings under options to fix this. What has happened, and how do I fix it? (I'm using Excel 2003 SP1 - is there a SP2?)
View 2 Replies
View Related
Mar 19, 2008
I have come across an issue and I am not sure what the best way is to achieve my goal or if it's even possible. We are importing dates that are in IBM DB2 Date format. Example: the date is imported as 1060318(C/YY/MM/DD), which is is actually 2006 March 18th. I would like to convert 1060318 to something that Excel can format into March 18th 2006.
View 9 Replies
View Related
Feb 26, 2014
In cell B5 of sheet1 contains a date which changes everytime when i open excel file. The date is in the M/D/YYYY format.
I am using the following code to use that date in MM/DD/YYYY format.
[Code] .....
If cell B5 of sheet1 is 2/1/2014, but my code is resulting in wrong as 01/02/2014.
View 3 Replies
View Related
Dec 24, 2012
I have a question about conversion of a text format into date format.
2 computers, the first windows vista, the second Windows 8, both Excel 2007.
The purpose is to calculate the difference between 2 dates with hour:minutes:seconds, like for example:
18/12/2012 19:20:00 and 18/12/2012 19:23:03.
So in this example the result should be 00:03:03.
Both dates are formatted with 'personalized' : dd/mm/yyyy hh/mm.
In the first computer everything works like it should, but in the second it is apparently impossible to transform the first of those date h:m:s which is originally in a text format into a date format. I tried all the methods which i found to transform a text date format into a date , like multiplication with 1, Datevalue and others, but nothing seems to work, the result is always "#Value".
View 4 Replies
View Related
Aug 28, 2009
I use the following codes to convert YYYYMMDD into DD/MM/YYY
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))
I use this on quite a regular basis, I would like to convert this to a macro so I can simply select the cell/cells and press the button.
Firstly is this possible and can anyone provide a script?
View 9 Replies
View Related
May 30, 2013
Total amount in Column B should same as shown in Column F
=IF(E3<>"",SUM(OFFSET($C3,ISTEXT(E3),,,1):C3),"")Above formula is calculating always two rows.
View 2 Replies
View Related
Apr 10, 2009
I have problem with vlookup. I am attaching my file.
View 3 Replies
View Related
Sep 3, 2013
I am including an attached file for reference.
The file is sorted A-Z, but if you scroll down towards the bottom, you will see that some values are out of order. Both instances of University of Central Florida and University of North Dakota are out of place.
University of Central Florida should be between University of California and University of Colorado.
University of North Dakota should be between University of Colorado and University of Southern Mississippi.
View 1 Replies
View Related
Feb 5, 2009
I have a really strange problem i have two different hard directories o: & u:
i have the following code linked to a command button
chdir "U: foldername foldername foldername"
saveactiveworkbook.saveas range("c9")
View 6 Replies
View Related
May 25, 2006
I try the following selection
Columns("B:AF").Select
Selection.ColumnWidth = 2.3
It is selecting columns a to af. Why would take column a if it is not part of select?
Sub Add_worksheet_month()
Dim Lst() As String
Dim I As Integer
Dim wname As Date
'Dim wmonth As Date
View 4 Replies
View Related
Nov 15, 2008
I am trying to work out an excel workbook for calculating family recipes. I have gotten most of it figured out but am having a problem with one thing. When the serving size of an item is 8 oz & the recipe calls for 14.5 oz the only way I can get it to work properly is to enter 1.75 in the serving size.
But I would like (actually need) to be able to enter the 14.5 and have it calculate the calories correctly - since sometimes the amount to be added to the recipe may be 15 ounces and the serving size is 8 ounces etc....
View 6 Replies
View Related
Oct 7, 2009
I have a rank formula that is seemingly erroring out on certain cells - indiscriminately. I have tried and tried to figure this out for myself but this is beyond my knowledge.
Only on some cells is the rank not working and returning a "-" (the error result).
I want the rank to use absolute numbers, so that it will rank according to variance or percentage (regardless of +/-). I am also using another cell (R1) to tell the rank what column to use.
As you can see there are a few entries, both + & -, that are not being included in the rank - for reasons beyond me.
View 8 Replies
View Related
Oct 25, 2009
I have 6 categories that need to be ranked 1-6 in order of highest number of occurances. My ranking formula is showing 1-7, missing number 3. I have attached a sample worksheet further showing what I am trying to explain. I need cell A3 to show a ranking of "3". Currently it shows "4". What am I doing wrong??
View 4 Replies
View Related
Jan 29, 2009
I have a form with 2 buttons and a frame. Inside the frame I have another button. I get a Type Error Message when I run the code and I don't understand why.
View 3 Replies
View Related
Jun 22, 2009
I have the following two codes on a userform, The first code performs two steps:
The first step is running the second code (MyDate), which is used for checking the entries in the userform textboxes and if there is any wrong entry a message box appears then it exits sub.
However, what happens when it finds any wrong entry is that it displays the msgbox and instead of exiting sub as it is requested in the (MyDate) code, it resumes running and moves to the second step and adds 1 to ComboBox1 ListIndex.
View 4 Replies
View Related
Apr 2, 2007
I am in the process of converting my programs over so as not to use these and I am already seeing a drastic difference in speed.
I have run into a problem that I need help with. I have a spreadsheet similar to the example below. The first column contains a list of college majors and after each major is a row of classes that are required by that major.
A25346 ENG101 MAT115 PSY150
A35678 ENG111 MAT115 SOC101
A23456 ENG101 MAT116 HIS201
The first thing I need to do is search down the first column for the major. Once the major is found I need to search across the row for the class. I am having trouble searching across a single row for the class.
Here is the section of code where I experience the problem
Set rMajor = wsMajor.Cells.Find(What:=Major, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
If Not rMajor Is Nothing Then
majorrow = rMajor.Cells.Offset(0, 1).Value............
View 9 Replies
View Related
May 25, 2009
I often have problems with the cells range reference method. For some reason I get an error and can't tell why. Other times it works fine. Is this just an unstable method to use or is this completely wrong? I'm assuming I am using the wrong syntax. It is definetly the range reference causing the problem.
Dim cnt1 as integer, cnt2 as integer,cnt3 as integer
cnt1 = 2
cnt2 = 50
cnt3 = 2
dim myrange as range
set myrange = sheets("sheet1").range(cells(2,cnt1), cells(cnt2,cnt3))
I have no idea why it won't work. I'm basically searching a columner range of cells.
View 2 Replies
View Related
Feb 21, 2013
The code below is supposed to insert a column and rename it. However, when I debug, the code only renames the column, it does split or run the loop. I press debug again, and then code executes as it is intended.
I can't explain why I have to press debug twice for in order for the code to work properly.
Code:
Sub renameColumns()
With Sheets("byPosition")
Columns("E:E").Select
Selection.Insert Shift:=xlToRight
.Range("E1").Value = "Exemption"
.Cells.EntireColumn.AutoFit
[Code] .......
View 2 Replies
View Related
Oct 12, 2012
I thought I had been able to use array to have more than two criterias with Autofilter, but now I am unable to make the following code work. What I am trying to do is have all the records that does not contain either N/A, S/O or xx and also have a filter on column 125 for the value "OUI".
VB:
Sub test()
Set ws1 = ThisWorkbook.Sheets("SOMMAIRE_EN_ALL")
Set ws2 = Workbooks("Fichier_central_2013_anglais_2_CLEAN").Sheets("DETAIL_CONCAT")
Set r = ws2.Range("A1:du4783")
[Code] .....
View 3 Replies
View Related
Jul 1, 2014
I'm using the following code to try to ensure a value is entered into a text box, but when I click over to the next text box skipping the first one entirely, I don't receive any message indicating the previous box is empty. I'm trying to make it so certain fields are required and others are optional. Here's the code I'm currently using:
[Code] .....
View 14 Replies
View Related
Jul 23, 2012
I have entered a custom sort order under 'first key sort order,' but the field is not sorting according to the list.
I'm sure I entered the list correctly, because I actually entered it a long time ago, and it was working for a while. However, today the underlying data was temporarily erased, and the pivot table, when refreshed, basically went blank. I restored the data and refreshed the table, but this field is back to sorting in the wrong order. Refreshing the pivot table and re-choosing the appropriate sort options do not work.
View 1 Replies
View Related
Jan 8, 2013
Had been using this formula for almost 3 years, recently the formula didn't work properly as the range goes down halfway only instead of to the last data in the column. I'm using Excel 2010 now.
=Sheet1!$A$2:INDEX(Sheet1!$A:$A,COUNTA(Sheet1!$A:$A))
View 2 Replies
View Related
Mar 13, 2013
I have a large file with account numbers in Number format. Before I can import the data into a database the account numbers need to be converted to Text. I use Text(A1,0) to do this in a large file. The data then gets copied into a new Import file. When the data gets copied the account cell reverts back to scientific notation for the long account strings. The import file account column is formated for Text. The only fix is to then double click on each account that is in scientific notation to convert it back to text.
Is there another text formula I can use?
View 1 Replies
View Related
May 30, 2007
What is the custom format cell type I need to create to make cells in inches (such as 0.125, .25, .375, 3.125) into the format of 00-00-0/0 where the 0/0 is 1/8 of an inch? So, 4.25 would become 00-04-2/8. 62.25 inches would become 05-02-2/8.
View 9 Replies
View Related
Oct 26, 2012
Every month, I have an import a report to a spreadsheet. At my column A, it supposed to be a date format.
For some reasons, I have a combination of a few cells of date format and a few cells of general format with no order at all.
What I need is: Search in the A column, if date format leave it , if not change from general to date format.
View 2 Replies
View Related
Oct 17, 2012
I have two columns where there are dates (e.g. 11/05/2009) in a date format; I would like to change the format to `general`; but without losing the original values, i.e. I still want to see 11/05/2009, but just in `general`format. Is it possible to create a macro that will do that? I want these values to stay in the same place, i.e. if it is in cell K10, I still want to have it there - just in other format.
View 9 Replies
View Related
Mar 27, 2013
Is there a way to disable the Convert button on the File menu and also to limit the Save As file types? I have a workbook that I maintain in Office 2003 that gets filled out by customers and returned. When a user with a newer version of Excel converts the file, it doesn't function properly when I go open it. I believe the conversion issue has to do with Active X Controls, but I'm using them to do some things that won't work with Forms Controls, so replacing them would be a last resort. Also, upgrading Office isn't an option at this point.
View 1 Replies
View Related
Apr 26, 2007
I can't understand why this macro no longer works. The macro runs without error but never proceeds because it doesn't think the dates ever match when infact they do. Here is the part of the macro not working.
Sub Equity_Dividend()
Dim wb As Workbook
Set wb = ThisWorkbook
For Each Sh In ActiveWorkbook.Worksheets( Array("G&I", "Growth"))
For Each ce In Sh. Range("a5:a" & Sh.Range("a65536").End(xlUp).Row)
If Not IsEmpty(ce) And Not (IsError(ce.Offset(0, 50))) Then
If Date = ce.Offset(0, 50) Then
'here is the meat of the macro it never gets to ...
View 9 Replies
View Related
Jun 16, 2014
Using the text to columns option on a comma separated file in csv format leads to the right preview in the text to columns wizard.
The column titled "ATTIC: Zone ..." shows the desired format in the preview window. Please look at the screenshot 1.jpg.
After pushing the finish button to obtain the result the number format gets suddenly changed and differs from the preview.
Again check for the "ATTIC: Zone ..." column as reference: 2.jpg
Is there a menu where one can look up, or specify how to format data to force the right comma placement? What settings might be wrong?
View 3 Replies
View Related