I am having a problem with the correct coding needed for a qotation mark
i wish to place a quotation mark around some text with coding
example "TEST" by using the code below this appears fine and looks fine when i save the file, however when i open that file in a .txt file i see """TEST"""
This is the coding i am using and can see it may be where the problem lies
I would like to query your knowledge database (too much VBA I guess ) as I have a predicament that I cannot seem to solve.
Here is the thing: I am trying to write a sub that would enable me to automatically put in place extensible name ranges (the Offset worksheet function).
The problem is that, despite everything seems to go well, the reference in the name box displays : ="DECALER($C$2;0;0;5-1;1)" (the string comes from a variable and Decaler is Offset in French). These quotation marks are the culprits for sure, as taken off the formula works beautifully.
I've tried everything I've found on the internet, that is to say: Replace(String, Chr$(34), "") so on and so forth, but these marks are not recognized a part of the string so they escape the replacement.
As a data download I got a block ** text with each item enclosed in "" "" and comma delimited. I converted to a table and copied the column I want to a 2003 excel file. How can I remove " " and treat column as simple numeric? I will then have to convert large application to 2007 as I am in that now.
I have a macro that imports xml and then allows the user to update certain fields. The XML contains many quotation marks and inbound I deal with this by replacing " with ' using Find & Replace.
But before exporting the XML again I need to replace the ' with " but am stuck on how to do this.
For instance I'm trying the following with no success:
I'm trying to create a shortcut that will allow me to add quotation marks to the begining and end of text in cells. I've tried the following, which works fine when only one cell is highlighted:
VB: Dim rng As Range Dim txt As String Set rng = Selection txt = """" rng = txt & rng.Value & txt
However as soon as I highlight more than one cell, it errors. How to make it work for a range of cells?
I have the following line of Selection.AutoFilter Field:=1, Criteria1:="=2009_15", Operator:=xlAnd
The highlighted portion is going to change from week to week. I have never been able to put a variable inside of quotation marks. I am sure it is simple, which explains why it is out of my mental grasp. how I can assign a variable in there?
To prevent the display of values in a worksheet, I have used an If statement in the format: =IF(I67=""",""",I67). This generally works well; however, I have discovered that if the input value for I67 is actually zero, there is no value displayed in the cell. I need the value to be displayed as a numerical zero so that it can be used in subsequent calculations.
I'm trying to find and replace all the quotation marks (basically just deleting them) on a worksheet through VBA. I've tried a number of things and am stumped. The code I'm using is:
Cells.Replace What:="", Replacement:="", LookAt:=xlPart, MatchCase:=False 'Replaces the quotes.
I have an excel program that reads a file and prints it to the work sheet, but I can't figure out why it puts quotation marks around the line of text. I would like to remove the quotation marks from column A and column D.
I'm using a query that dumps information into Excel. The query automatically creates a formula in each each cell. For instance if the first value in the query showed FUNSTUFF, after dumping it into Excel, the contents of the cell would show ="FUNSTUFF". I can just use a find and replace to get rid of the leading =", but sometimes the values of the cells are supposed to have a quotation mark, so using the same method to remove the trailing quote won't work. I need a way to search each cell, check if the last character in the string is a quote, and if it is, delete it.
HTML Code: =CONCATENATE("<img class=",""""&"alignleft size-medium"&""""," ","title=",""""&D6&""""," ","src=",""""& "http://www."&E6&"/images/"&C6&""""," ","alt=",""""&F6&""""," />")
The code looks good in the cell:
HTML Code: <img class="alignleft size-medium" title="Image title here" src= "http://www.mywebsite.com/images/image_name.jpg" alt="Image alt here" />
But when I copy/paste onto a txt file, its adding an extra (unnecessary) Quotation mark (see code below)
HTML Code: <img class=""alignleft size-medium"" title=""Image title here"" src= ""http://www.mywebsite.com/images/image_name.jpg"" alt=""Image alt here"" />
importing a text file. 3 times per day, I pull a report off a website and save it as a txt file. Typically, the data consists of approx 2000 customer ID's, and their respective data. When I import the data into Excel, it uses 2 or 3 rows to list information for each customer ID. I need a to seperate out only the customers ID which are 9 numbers long (no text in the ID), their SS #'s, and are listed as "FUL Request" or "PTR Request".
Since the data takes up 2 or 3 rows, the "Text to Column" feature does not work.
So the VBA should be able to look at each row, and if it has a 9 number customer ID in the row directly above it, and meets all other criteria, them post the customer ID number, the SS# and the verbiage "FUL Request" or "PTR Request" onto a seperate sheet.
Or the VBA can simply delete the rows that don't meet the criteria listed above.
I am using Chip Pearson's method of importing a text file into Excel (found at http://www.cpearson.com/excel/imptext.htm )
It works great except for one aspect. Two of my columns of data are in the format "dd/mm/yyyy hh:mm:ss", which is very necessary.
I have set the worksheet, the file is being imported into, to the same format. My problem is that, during the import of data, Excel (in it's wisdom) decides to automatically transpose the dd and mm numbers (if they meet the natural calendar conditions i.e. 01/09/2006 becomes 09/01/2006, 09/01/2006 becomes 01/09/2006 whilst 21/09/2006 remains the same).
As you can imagine this causes havok with several other functions that I have running off that source data (once imported). I have looked at the code and, whilst I can follow the general gist of it, I am unable to find any reference to format of the data.
I have a program in unix that ouputs a text file in .csv form which allows me to import my data into an excel spreadsheet very easily. I am wondering if there is anyway I can add formatting, like to tell excel to make a cell green or something like that.
If it can't be done with .csv, is there any other tool or format available that will accomplish this?
I have VBA code that imports a text file using a fixed width separator within the code. The code is working just as I need it to work and placing the information/data in the columns that I have specified in the code.
The issue I have is I only want to import certain data that is contained within the text file. It is going to be a little hard to explain, so I have attached a sample of the text file with dummy data to better explain. The file is broken up into different segments. Each segment is identified by a “Base Number” in column A of the text file (once it has been converted into an Excel file).
For my example, I only want to import data for Base Number 38451. The information for this segment is easy enough to identify when the data starts and when the data ends. As in this example, the first occurrence of 38451 begins at row 257. Once the first instance of this number is identified, the first row of data that I require is always two rows after.
I think the coding should go something like this, but I just can’t figure out how to put it into my If cell in column A = 38451 then - start importing from 2 rows down - continue to import until next row in column C is not = date
If row in column C = blank then - search in column A until cell = 38451
If cell in column A = 38451 then - start importing from 1 row down - continue to import until next row in column C is not = date
Else - stop import
I have included two files. (1) the text file with the data (2) the Excel file. There are two tabs in the Excel file “ReconSheet” (contains the data that is imported from the text file) and “Desired Result” (this is how I want the end product to look).
am in a time crunch to write VBA code(not use the macro recorder) to do the following:
Input data from a tab delimited Text file into a pre-formatted sheet.
Each column of the text file is as follows (product code, buy/sell, quantity, price, date) Example row below.
YM Buy 50 12800 1/2/2008
Is there code I can use to do this? I need each individual piece of data to import into it's own cell while keeping the Row/column alignment of the original text document.
I run reports that tell me when an individual is supposed to be in the office and when they actually log in, but this is a manual process where I have to go through several hundred people each morning and check. I have created a macro that pulls in their time in and out and makes there name appear as Last, First.
I run a seperate report that creates a schedule with headers and other information that is useless in this process. I have attached a dummy file and get this down to the last, first name and then the times in and such with no headers? I am also trying to keep the total number of people at the bottom in it's own cell.
I am at a loss as the file uses multiple spaces and not ,'s or ;'s etc.
FILE:
From: 12/14/11 Data TotalView 12/14/11 To: 12/14/11 Company ABC 13:45 Daily Start/Stop Unit Name RED
Need Macro where I can import a text file saved on my computer into a new sheet named yesterdays or todays date in format "ddmmyy" and then the sheet gets hidden.
I am having problems choosing a format for the column in my spreadsheet that contains my account codes. This is especially a problem when the code starts with an '=' sign and is followed by a number or has a '£' sign followed by a number.
I receive the file in a .txt format which I guess if I get it that way I would not have a problem but as I need to work on the file in excel before uploading it I experience problems. For instance when I open the file the codes that begin with '=' + a letter for instance =Y just comes up as '# name?' and only when I click in the cell can I see that it is =Y. Also the code '=1' just comes up as '1' as does '£1' - now this causes problems as for a start I need to do Vlookups on the account code but now instead of three distinct codes I have 3 1's.
The only way that I have discovered how to solve this is to click into each cell and add a ' before the text. (this changes the format to text - right??) But obviously this is very time consuming - is their a quicker way to change these cells. I can't just right click and format cells - text. This does not work?