Excel Changing Format From General To Text During Macro Execution?

Jul 25, 2013

I have a procedure that allows me to view and make changes to data in a table. I list the current values for the item in one column and use simple formula to copy that value to another column where if there are changes that need to be made, the formula is simply overwritten. The Macro is then selected using a command button and the formulas are all overwritten using copy/paste values to keep from writing out the formula to the data table. These values are then all written back to the data table, current values are overwritten with whatever is in the update column, new data or old data.

I have one cell out of 48 that has decided to march to the tune of a different drummer. The format changes from General to Text and the formula written from the macro is what shows up in the cell instead of the value of the formula. Never a big disciplinarian, I have to wonder if I have been too lenient on the cell and this defiance is the price I have to pay.

The sheet is protected only allowing entry into the cells available for update.

Here is the bit of code that affects this cell (starting from a format of General:

Code:
Sheets("Product Data").Cells(ItemRow, 3).Value = Sheets("Update").Cells(6, 8)
Sheets("Update").Cells(6, 8).FormulaR1C1 = "=(RC[-6])"

I just don't see anything that would change the format, and these are the only two lines that even reference cells(6,8).

I tried to set the format for the cell from within the Macro, but with the sheet being protected, it just dumps me out to my error message.

View 1 Replies


ADVERTISEMENT

How To Avoid Replace From Changing The Datatype From Text To General

Apr 18, 2013

I am trying to find a way of replacing a whole amount of data, over 1000 items, initially each cell contains this >>> 056001 Not Set, I am trying to remove 'Not Set', but the big problem I am facing is that Excel also removes the leading 0 or zeroes, when it finishes removing ... I tried several things, like changing the column to Text, and then paste the data from another column, because I read the Text format is preserved, nothing, as soon as the column is pasted it changes back to General, if I change it back to Text again, and then apply a Search and Replace, each cell is changed to 56001, which is not what I intended, the only way I have seen it works is if I manually remove the string, then it works and is changed into the text format and number as text, as I intended to

View 1 Replies View Related

Macro Or VBA - Search General Format Convert To Date Format

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

Macro To Change Date Format To General Format

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

Excel 2010 :: How To Reset Workbook Default Format To General

Jan 25, 2011

Using Excel 2010 - I have a large workbook with multiple worksheets - been using it succesfully every day for a long time. All of a sudden every empty cell, and any cell not specifically formated in every worksheet has a default cell format of Time. Any new workbook created is OK.. defaults to 'General' - But, if I add a new blank worksheet to this particular workbook it defaults to 'Time' format. How did the default cell format for this workbook become set to 'Time' from 'General' and how do i fix it?

View 2 Replies View Related

Change Cell Format From Custom To General Or Text And Keep Cell Value

Aug 22, 2013

Is it possible to change cell format from custom to general or text and keep the cell value

I have this in formula bar: 16/08/2013 4:37:00 AM
which is displayed in the cell as: 16/08/2013 4:37

I want to change the cell format to general but display the same information.

View 2 Replies View Related

Save Number As Text In Txt Format Wo Changing The Format

Mar 1, 2007

In order to export an excel table into another program I first need to save the excel file as .txt. The .txt file can then be imported by the other program.

First I however need to make excel understand that the value should be a text and not a value. I therefore format the number as text (0000150235) by adding "0000150235". After saving the file as .txt the format changes from "0000150235" to """0000150235""". I do however need the format in the .txt file to be "0000150235". Can anyone tell me how I can save "0000150235" as .txt and get the value "0000150235" in the .txt file.

View 14 Replies View Related

Convert General Format Into Date Format?

Mar 23, 2012

How we can convert any data which is in General format in to date format.For ex I've:

19/03/2012 14:57 (General format)

I want the output/result

19-Mar

View 5 Replies View Related

Macro Changing Text To "?/??" Format?

Aug 28, 2009

I have the code below in a macro which seemed to work fine but somehow it manages to convert cells in text format into "?/??" format when the macro is run. This bit relates to the part of the code highlighted in red below.

this is causing me major problems and need to fix it asap. I've attached a copy of the workbook if it helps. Unfortunately, to run the macro you will need to change the file directory to one that will suit.

View 6 Replies View Related

Sum Cells With General Format

Mar 12, 2009

I have a group of cells in E2:E4 that are 144.00 in, 240.00 in, and 72.00 in and are formatted as general.

I get these values when I export data from an AutoCAD program to Excel and I want to sum these values to get the total length.

I want to sum the three values and have the result be the same (i.e., ###.## in). The number of values can go to 30, so I need a simple line of code, =SUM(???)

View 9 Replies View Related

Changing Text Format

Sep 18, 2007

Currently we do a lot of report crunching using Crystal Reports. We will then dump the data into an Excel sheet to run varying pivot tables or databases off of.

Often we will have a field that the formatting will not match up to anything in Excel. You can change the cell to Text, General etc. The main problem associated with this is running VLOOKUPs. The item we type in will not match up to the data imported from Crystal. We have to F2, the new data before it will match up which is a pain considering there can be anywhere from 30-1000 rows.

I'm trying to solve this problem in 2 ways. First can anyone tell me an easier way to do handle this?
Second, after trying many other things I thought about a macro that would automate the F2 process.

View 9 Replies View Related

Automatically Format Date Cell As General

Jan 8, 2007

I have a cell that is constantly being changed from a date to a number. Excel automatically formats the cell as a date when a date is entered but if I re-enter a number it leaves the format as a date.

Is there anyway to automatically change the format back to general if a date is not entered.

I had this bit of code obviously it dosent work.

If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("E8:E46")) Is Nothing Then
If IsDate(Target.Value) Then
Target.NumberFormat = "d/mm/yy;@"
Else
Target.NumberFormat = "General"
End If
End If
Cancel = True

View 4 Replies View Related

Adding Numbers In HH:MM Format To Give General Total?

Feb 5, 2014

I need to add some HH:MM values to give a total general value, its for a staff rota, i need total values for the hours worked per day/week.

eg. three 8 hour days in 08:00 format to give a total of 24

View 2 Replies View Related

Type A Number In A Blank Cell With The General Format

Aug 10, 2009

My excel recently the General number format so that when the general number fomat is used and I type a number in a blank cell with the general format, the number is always divided by 10.

E.g., I enter "102", the number is automatically improperly converted to 1.02.
However, if I enter "=102", the number is properly entered as 102.

How can I reset the General format to the original setting without this divide by 100 problem?

View 3 Replies View Related

Date Format Error - General Number Field

Feb 18, 2013

I have a spreadsheet with a column full of dates

I used the formatting wizard to make all dates the format of dd/mm/yyyy but, now, when I put a date in the column it throws up a number '41313' instead of a date, even if I manually input the date in the same format as above.

Also, I have tried to turn cells back into general number fields, but this doesn't appear to be changing it back to a date format..

There are HUNDREDS of dates I might have lost if I can't get them to start showing as dates again!

View 2 Replies View Related

Converting General String Month To Date Format?

Jan 18, 2013

I have a cell which says November , 2012 in General format

In the next cell i want a date of the following month . Eg : 1-Dec-2012.

I tried =DATE(RIGHT(G4,4),LEFT(FIND(",",SUBSTITUTE(G4,",",",",1))),1)

View 1 Replies View Related

Convert Serial Date Time To General Format

Jul 28, 2007

I use software that exports date/time stamps in the format of: MM/DD/YYYY hh:mm:ss.s
I like to keep the data in this general format so that we can keep it consistent and it can be useful to others using other software.
I recently had to do some date/time stamp manipulations where I added 61 days to a dataset because the data was erroneously set to a diferent calendar. (Still don't know how that happened but it isn't relevent to this issue) When I set up a formula to add 61 days, it appears that it automatically converted it to the excel serial date/time format before adding the 61 days. Now I have a column of data that is mostly general format but has this portion in serial format. How can I get the serial format changed back to general so that the entire column is in the same format?

View 9 Replies View Related

Changing Date Format In A Text String?

Jun 18, 2014

So I'm just a lowly intern who has been given the task of changing date formats in a bunch of spreadsheets. The string is as follows:

1015 Dixon Schwabl Est. for Creative Svcs 101207.pdf

I have to change the date at the end (mmddyy) so it reads as yyyymmdd. There is a long column of these strings, and i have to do it on over 300 spreadsheeys.

View 3 Replies View Related

Excel Date Format Not Changing

May 22, 2014

When I tried to import data in a CSV file, I ran into a couple of issues when trying to change the date format from MM/DD/YYY to other date format. I've already tried a couple things to no avail:

1. Use text to column functions and change the format from text to MMDDY
2. Use format cell function and change the date format
3. Use the text function (text(Cell,"MM-YY"))

Interestingly when I click on the cell and put my cursor and press backspace, the format will change. It seems like there's an extra space, but using the trim function does not work. I can't do this to thousands of data manually.

View 7 Replies View Related

Symbols For General Number And General Letter

Aug 7, 2008

I'm trying to make an excel formula that generalizes product names based on their format. So the general format would be XYZ08/T13. I know a ? is equal to a general letter, but is their a symbo that specifically means letter or number. I'm running into problems using the ? because the formula ends up identifying additional items that are not products as products.

View 9 Replies View Related

Changing Date Format In Microsoft Excel?

Oct 27, 2013

in the date fields excel only recognises some of them as date, so when I try to change the format of dates (mm/dd/yyyy to dd/mm/yyyy) it only changes some of them so I end up with some wrong dates.how I can make excel read them all as date?

View 3 Replies View Related

Change Manual Execution To Automatic Execution

Jun 1, 2007

I have this codes which will only trigger if I manually execute it. What do I need to do to trigger it automatically whenever the worksheet change.

Below is the codes:

Sub Risk_Color()

Dim c As Range, myFontCol As Integer, myCol As Integer

For Each c In ActiveSheet.Range("f7:g20000")
myFontCol = xlAutomatic
myCol = xlNone
Select Case c.Value
Case Is = 1, 2, 3
myCol = 34
Case Is = 4, 5, 10, 20: myCol = 43
Case Is = 30, 40, 50: myCol = 6
Case Is = 70, 100, 140, 150
myCol = 5
myFontCol = 2

View 9 Replies View Related

Excel 2010 :: Changing Format Of Dates In A Column?

Oct 19, 2013

I am working with a 2010 Excel spread sheet and need some direction.

One column has dates in it. Some dates are like dd/mm/yyyy (eg 15/03/1974) and others in the same column are in the following format 14th October 1983.

I need all of the dates to be in the first format (dd/mm/yyyy).

Is there a way to do this without manually changing each field? I have already tried highlighting the column, then clicking the 'numbers' arrow and picking 'date' from the number tab but that didn't work. It's never that easy, is it?

View 14 Replies View Related

Changing Date Format Macro

Jun 17, 2009

I would need a macro what would change this format (15 Jun 2009) in cell B2 to 2009.06.15.

View 5 Replies View Related

Excel 2007 :: (Save Files In Format) Settings Keeps Changing

Sep 28, 2011

I am having trouble getting Excel 2007 on my work computer to save as .xlsx by default.

I have opened the Office Button > Excel Options > Save > Save files in this format and selected "Excel Workbook (*.xlsx)," and if I save as before closing Excel then it works perfect and saves the file as .xlsx. However if I close Excel, re-open it later and save a new file the default "Save as type:" is "Excel 97-2003 Workbook (*.xls)" and if I open the save options again the "Save files in this format" option is reverted back to "Excel 97-2003 Workbook (*.xls)."

I have finally overcome the [Compatibility Mode] issue by saving a file named "Book.xltx" (not "Book1.xltx") in the two default locations "C:Program FilesMicrosoft OfficeOffice12XLSTART" and "D:Documents and SettingsusernameApplication DataMicrosoftExcelXLSTART" (we use the D: drive at work for personal files). I thought this would solve the save as issue but it hasn't. I have also changed the "Save files in this format" before saving the .xltx files in the locations to apply the settings to those specific files but that hasn't worked.

It is on my work computer so I am limited in what settings I can change because they have them pretty well locked down.

View 7 Replies View Related

Import Csv As Text Not General

Feb 17, 2007

I need to be able to open or import a csv file and have the data be seen as text, not numbers. I can export programming from a phone system as a csv file, modify it and import it back into the phone system. some fields such as "seconds" are in the format 00. Excel sees it as a number and converts it to 0, which causes an error when I try to import again.

I have tried changing the csv to txt and copying it to a blank worksheet and then recording a macro using text to columns, but each export can be laid out differently, so a fixed array doesn't work. there can be over 100 columns so doing it manually and changing each column to text can be quite tedius.

View 5 Replies View Related

Macro Fill Down Function Is Changing Format In Conditional Formatting

Dec 18, 2013

When I hit the macro code you see below I get both columns D and E, starting from row 18, to get 'filled down' to the specified spot. Every second row has a conditional format (when a value is entered in column A) to change the row to the color grey, and every row between it has a conditional format (when any value is entered in column A as well) to have the row changed to the color red. The issue here is that the Macro code messes up the conditional formatting and uses the conditional formatting of those two cells, which are being dragged down, for those entire filled-down columns! This is what I am starting off with test1.xlsm and this is what I end up with using the macro code below (or doing it manually)

test2.xlsm

Is there a way for the Macro code to bypass this issue?

View 6 Replies View Related

Excel 2010 :: Changing Default Chart / Graph Format Copied When Pasted Into Word?

Aug 28, 2012

I work with a team of users that are continually publishing reports in Word that contain charts and graphs copy and pasted from Excel into Word 2010.

We have a custom script that leverages a PDF engine to automatically convert .doc files to .PDF files that we distribute electronically to our clients. This all works great, but only if all my users select 'paste special' and Enhanced Metafile Format when adding their excel charts into our reports. Most of these people aren't tech savvy, and I'm havin ga hell of a time getting them to follow this workflow and am hoping there's a way in Office 2010 to select the default paste from excel into word when the content is a chart.

It seems like the default paste from excel is an embedded chart/graph that you can then further manipulate each component of the chart in Word; the default doesnt' paste an actual image. I am assuming the pdf renderer is using a lower resolution .PNG version of the image and when these are scaled for print and or pdf, they look like crap.

Is htere anyway I can automatically change the default paste format for the chart from excel into word to be an EMF/EMV (enhanced metafile?) Either thorugh the registry or some other saveable setting?

View 1 Replies View Related

General Excel Search Tool For All The Functions?

Jun 30, 2013

Is there any excel-addin which offers function in which you could search any excel function (not just formula) so that you could access any function in a seconds, just like google desktop search for windows.

Right now you could use quick access for most common functions you use and shortcuts for functions in different group. But if there is universal search for all the functions, it is going to be faster for any access!

View 2 Replies View Related

Excel Column Filled With Word General?

Oct 28, 2013

I just had an employee come to me and ask to take a look at his Excel spreadsheet. One of the columns auto filled the word General all the way down. I tried to do a find and replace but it did not work. Then I tried to just delete the cell and noticed that the text disappears when you click into the cell. This "ghost" text is frustrating me and I can not get it removed

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved