String If Text Insert Date
Feb 11, 2010
I am trying to setup a variable from a dropdown selection box. Basically, If "Completed" is selected in the box, current date is set in the corresponding field.
The formula I have tried is:
=IF(F5="Completed",G5="",G5=NOW())
I have a variable string setup opposite of what I am going for that works:
=IF(AND(D5<>"Assigned",D5<>""),IF(E5="",NOW(),E5),"")
So if anything is showing other than assigned the date is input. But have not been able to reverse this for the desired output.
View 2 Replies
ADVERTISEMENT
Nov 20, 2009
I'd like to adapt my macro so that it would insert a blank row after it detects the the first 16 characters of text as "'Closing Balance"; or it could even detect "'Closing" as the first 8 characters if it would be simpler
The Data Begins in Row 5 of Column A
My Current Macro is as below which I have adapted from another one I used
It is not working since it is detecting for the exact text "'Closing Balance" whereas the data registry would write "'Closing Balance as at 31/10/2009" , of which the "as at dd/mm/yyyy" portion would change every time a report is exported, but the first part "'Closing Balance" or even just the word "'Closing" will always be the same.
View 6 Replies
View Related
Jan 13, 2012
I'm trying to write a bit of to take a text string collected from an inputbox, and paste it into a specific cell.
Should be easy but where my text string from the inputbox is "XYZ", when it enters it into the required cell it enters it as " ="XYZ" ".
Attempt at code is below -
Code:
Sub EmailEdit()
Dim Response As String
Response = Application.InputBox("Input administrator email address", , , , , , , 2)
'Check to see if Cancel was pressed.
If Response = "" Then
[Code] .....
View 2 Replies
View Related
May 10, 2009
I need a nudge in the right direction with how to amend the below code so that it :
1: cycles though all cells in a workbook, and sees whether the text reference of the cell contains a picture filename (i.e. searches for .png or .jpg in the cell contents)
3: if (1) is correct, it retrieves the picture from "C:/Users/jeff/Documents/Standards/" and pastes it as a cell comment background in the cell to the right (and overwrites any comment backgrounds that might already exist there)
The code below does something a bit different: it looks in a defined range, then adds a comment with a background picture retrieved based on the text in the cell to the left.
I'm sure this is a pretty basic change, but my VBA skills aren't up to it...I've only just started reading though Walkenbach's Power Programming! I'm using Excel 2007
Sub InsertComment()
'www.contextures.comxlcomments03.html
Dim rngList As Range
Dim c As Range
Dim cmt As Comment
Dim strPic As String
On Error Resume Next
Set rngList = Range("A1:A5")
strPic = "C:/Users/jeff/Documents/Standards/"
On Error Resume Next
For Each c In rngList
With c.Offset(0, 1)...................
View 9 Replies
View Related
Jan 17, 2012
I have these as input entered as text:
January 01, 2011 January 01, 2011 February 28, 2010 May 12, 2011 June 02, 2010 February 28, 2010 May 12, 2011 June 02, 2010 February 28, 2010
but I need it in this DATE format:
MM/DD/YYYY
I need it as a formula to be entered into a cell in excel (not VBA)
View 9 Replies
View Related
Sep 22, 2009
I have a column of data in the following format:
261D 31/12/2008
There is also a single space after the end of the date.
Can someone please show me a formula to extract the date from each cell in the column? This is slightly complicated by the fact that the number of days (“D”) could consist of 1, 2, 3 or 4 characters, and the date could also be of variable length (e.g. 1/1/2008 vs 31/05/2008)
View 6 Replies
View Related
Aug 23, 2009
My database has 6 fields names and I have created the following code to capture and post data to the database form a userform. It works but I am sure there is a more efficient and elegant way to do this. The two areas I would like advice are:
1. converting the date string to a date.
2. the line of code where I subtract line6 from line4.
View 3 Replies
View Related
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
Aug 13, 2013
I have a date range that looks like this (British date style, not US):
edit: I posted an image but it can't be seen for some reason:
Date Range
2010 11/10 17/10
2010 11/10 17/10
2010 11/10 17/10
2010 11/10 17/10
Thus the first cell show 11 October 2010 to 17 October 2010 I want to return just the first day (the week commencing date):
edit: I posted an image but it can't be seen for some reason:
Week Commencing
11/10/2010
11/10/2010
11/10/2010
11/10/2010
I have written some VBA to the best of my ability but it seems clumsy using the FORMAT function. Is there a better of doing this with VBA. I can't seem to find a function in VBA which is the equivalent of the formula function DATE.
Code:
Sub ConvertTextToBritStyleDate()
' dd/mm/yyyy (not mm/dd/yyyy)
' Select the cells containing the dates (not the header)
[Code]...
View 3 Replies
View Related
Jun 6, 2006
I want to format my spreadsheet title so it reads number of reports for june 2006
="number of reports for MM YYYY"
So far all i get is -
="number of reports for 6 2006"
using my code which is
="number of reports for "&$BD$2&" 2006"
View 6 Replies
View Related
Jan 18, 2013
Is it possible to insert text as a comment on another sheet based on a date?
I have Sheet 1, that has 3 columns, Name, Date, Reason
Sheet 2 is a monthly calendar with the dates in E5:AH5 and the names from D6:D10.
What I am trying to do, is when they enter their name, date and reason on sheet 1, I want the reason to to be inserted on sheet 2 as a comment in the cell that matches the date and the name.
View 1 Replies
View Related
Apr 11, 2013
I have a spreadsheet which has "Employee: [agent 1 name]" in column A and it may or may not have the word "Break" in the same column before it mentions "Employee: [agent 2 name]". The amount of data between agent 1 and agent 2 varies and am needing code which will insert a row above "Employee: [agent 2 name]" if "Break" is not found, and add the word "Break" in column A on the inserted row. I would need this to loop through the spreadsheet until all 100+ agents have been searched.
I'm also needing this done for the word "Meeting" and would insert a row 2 rows above the next agent.
View 6 Replies
View Related
Feb 18, 2014
I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.
View 2 Replies
View Related
Feb 20, 2008
I'm trying to write a macro similar to the one found here: here:http://www.techonthenet.com/excel/macros/checkbox.php.
Rather then use a textbox, I would like the cell to display the date when text is inserted in the cell to the left.
ie. I insert text (the letter 'a') in cell E11, and the date appears in cell F11.
I would also like the macro to do this for a range of cells ie. for E11 to F21, then from G11 to H21, then from I11 to J21, all the way to column IV.
View 9 Replies
View Related
Jan 22, 2014
this formula as a result =IF(LEFT(A3,1)="0",RIGHT(A3,LEN(A3)-1),A3) It worked great to strip the left most zero from a string of text numbers in the cells where the formula was applied.
However, now I need to put the zero back in lol!
So...how would I adjust the formula (or write a different one) to insert a zero as the first digit of a string of text digits?
View 4 Replies
View Related
Jan 31, 2008
Find a short text string in a column of longer text strings and when that short text string is found return the longer text string that matches.
View 3 Replies
View Related
Dec 18, 2008
I have a column called "Unit Size," which contains data such as 200 g, 0.32 g, 15 mL, 2 mg.
I need a macro to automatically insert a space between the numbers and the letters, for example, if someone types 10g it automatically converts it to 10 g.
The strings may be of different lengths, i.e. contain different numbers of decimal places or signficant figures.
View 4 Replies
View Related
Jul 16, 2009
In excel macro, I am trying to input data into sql server from excel ADO
what is the correct syntax for an insert statement using string sql? This table has two columns supplier ID autonumber and desc as varchar.
View 2 Replies
View Related
May 25, 2008
i'm a complete excel novice, but i think this should be pretty easy for you guys...
i just bought a new satnav system after 4 years with tomtom...
anyway, to get the speed camera database to work with it, i must add a couple of commas at the end of each set of co-ordinates contained within the spreadsheet, like this:
-3.23956,51.52737,1,50,1,67,,
-5.29024,50.22664,1,50,1,67,,
-5.27461,50.23143,1,50,1,247,,
thing is, most of them don't have the 2 commas at the end and just end with the number, like this:
-3.23956,51.52737,1,50,1,67
-5.29024,50.22664,1,50,1,67,,
-5.27461,50.23143,1,50,1,247
therefore, what i need to do is make up a formula in excel to search for a double comma at the end of each set of co-ordinates and if it doesn't already have them, then it should insert them...
i'm guessing for anyone with excel experience, this should be pretty easy to solve...
View 9 Replies
View Related
Sep 6, 2008
I've been working on this project to propagate certain products through multiple categories. I chose to use excel to assign multiple categories to each product. On sheet1 I have setup products (column a) and qualifiers in the following columns (color, model, etc). What I would like to achieve is for the user to select yes or no for each category column and and if yes then have the corresponding category breadcrumb string (from sheet2) inserted into one specific column in sheet3. As the user continues to select multiple "yes" from the category columns for that single product, those additional category breadcrumbs get inserted at the end of the list in sheet3.
View 9 Replies
View Related
Apr 29, 2014
I've got a long list of account numbers of varying length and ultimately need to add a dash and a dot into these numbers. Here's an example
12345678 to> 1-2345.678
123456789 to> 12-3456.789
1234567890 to> 123-4567.890
The standard format is always 3 numbers after the . and 4 numbers between the - and .
I can get to this by doing a series of functions starting with this:
=LEFT(A1,LEN(A1)-3)&"."&RIGHT(A1,3) to get 12345.678 or 123456.789
copy/pasting that value into another field and then doing this
=LEFT(E1,LEN(E1)-8)&"-"&RIGHT(E1,8) to get the results above
I can't quite figure out the format to combine the multiple steps/functions into one so that I'm not copy/pasting values and re-doing the function.
View 7 Replies
View Related
Jun 25, 2008
I have a user form that when a command button is clicked it enters the data from the from into coloums a,b,c,etc. I have code to do this but I want to add code to add a static date in coloum B based on if coloum A had data entered from the form. I need the date not to change to current date when the file is reopened. I am trying to elimate a date text box in the form. I have a link to the file http://www.box.net/shared/zdtsjv0qos
View 7 Replies
View Related
Jun 11, 2008
I'm working on some code that's part of a userform. To illustrate what I need, I will give an example. A column letter, 'J' for example, is stored in colNum.Value taken from the userform. I need both a column inserted before column J, and data entered into that new column in row 2 (thus J2, which would now be blank).
View 4 Replies
View Related
Oct 19, 2012
I have a spread sheet with a date colume that reads: 2012-06-27-19 I need to have this read like 06/27/2012 but nothing I do is working I have tried to go to the formatting process and backing the hr:mm out and that doesn't work. I really don't want to go line by line to manually correct this issue.. HENCE ... over 2000 lines
Second question: If I have a column that reads 02/15/2012 and another column that reads 3/27/2012 how to a format a 3rd column to make it read total number of days between 1st date and 2nd date?
View 1 Replies
View Related
Sep 24, 2008
I can't seem to make user-defined format that puts a text in front of a number and/or a text.
Let's say I have A1: 13, A2: texttext A3: text7 and I want to format a lot of cells to "Ilike 13" / "Ilike texttext" / "Ilike text7"... ie add the same text in the front of the cell, no matter what the content is.
I did manage it seperately, with "texttext" @ for text and "texttext" # for numbers, but what's the general one?
View 12 Replies
View Related
Mar 7, 2014
I have a sheet(Sample.xlsx) in which weekly data is collected and this is done by using the VBA code(Present in Copy 1 and Copy 2 button in Master US.xlsm) written by me. But in my code, it inserts a new after asking two parameters, i.e. line range(i.e. row no for eg A64) and date. I want it to automatically search row containing last date and inserts row below it and this needs to be implemented in "Insert Automatically" and "Insert Date" button using VBA code in Master US.xlsm sheet.I dont have problem with second paramenter.
Logic i want to use :
Itergation of whole page
{
If (col A<>Date)&& col A=Average(i.e. contains average word)
then
inserts row above that row
And then ask for date to enter using date variable.
then inserts row above that row containing last week data in col A.
}
"Insert Automatically" in Master US.xlsm sheet is the button which takes system date and implements the above logic.
"Insert Date" in Master US.xlsm sheet is the button which ask for only date and implements the above logic.
Sheets attached.
Master US.xlsm
Sample.xlsx
View 1 Replies
View Related
Jul 9, 2014
I have a set of task descriptions that I am attempting to trend on. Some of these (Column B) have the customer's name added to the description; others do not. I need to be able to make a list of task names (ColumnA), removing the name from the text string.
The formula I am using is [=LEFT(B3,FIND("for",B3)-2)].
The problem I am having is when the description does not contain the "for" built into the formula, I get "VALUE" error. What adjustment can I make to the formula to pull over the Description if the "for" does not appear in the text string?
View 3 Replies
View Related
Jun 29, 2014
I need to create a macro to do the following:
Search the activecell for a text string (a), and then either paste in text string (b) at the end of the cell if (a) is found, or text string (c) if (a) is not found.
For example, if the activecell has "AA/" in it, I want the cell to become "AA/01" (pasting in "01" at the end), and if the cell has just "AA" in it, I want it to still become "AA/01" (pasting "/01" at the end). The macro will be linked to a commandbutton.
View 7 Replies
View Related
Mar 28, 2009
refer to the attached workbook for reference. I am looking for a function in Sheet1, Column E that will search for the value of Sheet1, Column A within Sheet2, Column A. When a match is found, the function should look across Sheet2, Columns B - V for values of 1. When such values are found, the function should return the associated value from Sheet2, Row 2. There may be multiple values of 1, and as such, the function should separate values with a comma.
View 3 Replies
View Related
Mar 8, 2013
How do I use an Excel formula to find which (if any) multiple sets, each of up to 50 words, exist in a series of rows of a spreadsheet - if set A has one or more words found in a searched cell.
A positive result will return a specific value in the designated result cell. If none of the words in Set A is found in the searched cell, the formulae will repeat the test for the words in Set B, and so on.
After all 50 sets of words have been tested, the formula will move to the next cell in the searched column.
New words will be added to the sets of words continually as required.
Multiple words within sets are included in double quotes. Within each set of words there will be some n-tuples of words (i.e. 24 adjacent words) that contain one or more of the words in the set, but for which the formula will be required to return a negative result. Example: Set A = word 1, word2, word 3, "word1 word2 word3". (The words within a set could also be each entered in separate columns, as opposed to all included in a single cell.) The single column of text to be searched is about 10,000 rows.
I am wanting to use the above in a spreadsheet that contains data downloaded from a series of bank accounts to automatically allocate items of expenditure to one of 20 or so different categories of expenditure.
The formula will search the description field to find words that are used in the in the downloaded files from the various accounts to describe each transaction.
If a word describing travel expenditure (e.g. hotel, "holiday inn" but not "holiday travel") is found in the description of an expenditure item - the item cost will be allocated to the TRAVEL EXPENDITURE column, which is one of 20 or so different categories of expenditure.
Happy to consider a different solution if the task can be done better a different way.
Tried using a combination of INDEX/SEARCH/IF in Excel, but was not able to get a correct result. PS I am using Excel 2011 for Mac - which does not allow macros, so the solution needs to be entirely formula based.
View 1 Replies
View Related