Need Function To Write The Starting Date And Time Immediately

Feb 16, 2010

Ihave this exel sheet i nedd function to write the starting date and time immediatly after i enter the name in the last colume ineed from exel to write the date and time emmideatly if the case is (done, cancelled ,or rejecteted)if the case is (select status )i want the cell empty but if the case is (pending)iwant to the program to calculte the deffirence between the ClosingDatetimee(which written by the program)and the delivering date(which entered manually by user)

View 9 Replies


ADVERTISEMENT

Dateif Function That Counts The Starting Date?

Jul 28, 2014

I have the following formula to count the time between two dates and result in an answer with months/days:

=DATEDIF(E14,E15,"M")&" months "&DATEDIF(E14,E15,"MD")&" days"

The problem is that the function does not count the start date. Is there any way to modify this formula so that the start date is included?

For example if the start date is 02/01/2012 and the end date is 02/28/2012 it results in 27 days but I want it to result in 28 days or 1 month.

how to go about this or if there are any better date functions out there?

View 2 Replies View Related

Show Week Number Of Today Date From Starting Date

Jun 27, 2014

is it possible to display the week number of todays date (today()) from a physically entered start date (which would obviously be week one), the start date would be november 4th 2013.

View 3 Replies View Related

Find Starting Date And Fill In The Following Months Until End Date

Mar 4, 2013

I have collected some data on economic factors for different countries. Unfortunately, the dates when I started to calculated my economic factors are different for each country (due to the data available to me).

What I would like Excel to have done is to take the date when I started to measure for e.g. country A (D3 ie 30/06/2007), copy it into column "I" (for country A, it's cell I3) and fill in the following months in the rows below (with always the date of the last day of a month) until it reaches 28th of Feb 2013. Then, it should go up to the next country (country B) take the starting date (D4, ie 31/07/2007), go to the last entry in "I" (ie I71) and paste the date in, fill in the months until 28th of Feb 2013, do the same for country C and so on.

I have started to code a VBA but I am unfortunately a beginner in VBA and totally stuck at the moment. My VBA code does paste in the months but for some reason, it also changes the starting date of the first month.

Moreover, I tried a workaround for the fact that Excel doesnt know when to stop; ie I introduced a "monthdiff" variable which should calculate the number of months between the starting date (which is variable and unique for each country) and the end date (which is always 28th of Feb 2013). At the moment, it only does this for country A.

VB:
Set rng = ActiveSheet.Range("I3" & Cells(monthdiff, "I").Address)[SIZE=4][/SIZE]

I have tried to make this dynamic but have been unsuccessful so far.

Spreadsheet with data&code is attached.

VB:
Sub Macro1()
Dim mainrange As Range
Dim rng As Range

[Code].....

View 3 Replies View Related

Subtracting Time/date Using NOW Function

Oct 6, 2009

I have a working week that starts at 07:00 on a Monday morning and finishes at 14:30 on a Friday afternoon.

For planning purposes I need to know at any given point how many working hours are left. The reason for this is so that I can multiply that figure by the amount of Engineers available which will give me the amount of Man Hrs left in the week.

For example - if it is 11:00am on the Tuesday, how many working hours are left ....

View 13 Replies View Related

Format Now Function For Time & Date

May 10, 2007

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?

View 9 Replies View Related

"Time" Function To Find Time&date - ?hours

Dec 17, 2008

I m Trying to add some features to it and run into an issue. Here are the fields we are working with!

A1= 13:30:00 17/12/2008
(in other words 1:30pm on date given) - Need to know proper cell number format!!

B1= 23:00:00
(this represents 23 hours) - format for cell is [h]:mm:ss

C1= Unknown function
(This field is my problem!!)
Answer here SHOULD be "14:30:00 16/12/2008"

I need a function for C1 (using A1 and B1) that will give me the time and date 23 hours earlier or however many hours:mins:secs is specified in B1! Also need to know what number format to use for both A1 and C1

View 4 Replies View Related

Completing IF Function With Date And Time As Inputs?

Jan 16, 2014

Using the attached doc, and its legend tab, I need the following columns corrected as I am seriously tripping up on formats vs inputs for outputs.

1.) Column "N's" result based on the duration output of the preceding column "M" is:

<=4 = 40
5 = 30
6 = 20
>=7 = 10

2.) Column "Q's" result based on the duration output of the preceding column "P" is:

<=18 == 40
>=19<=24 == 30
>=25<=48 == 20
>=49 == 10

The legend tab shows the info as well.

View 3 Replies View Related

Write The VBA Function Through The Function Wizard

Sep 16, 2009

I have written a VBA program and using in Ms.Excel. The problem is when I try to write the VBA function through the function wizard it works but when I write the function in excel worksheet cell, it doesnt execute. I do not now the reason.

View 2 Replies View Related

Write An If Then Else Function

Jul 26, 2009

I'm wondering if an if then else function can be written for the problem that I'm having? Or is there a better way to accomplish this? I've detailed my problem within the example attached.

View 3 Replies View Related

Function To Write An Array

Jun 20, 2008

I have the following assignment to do, problem is I'm new to arrays and functions in VBA and nothing is working for me, i get errors no matter what i try, (for example i don't know how to feed the array to the function, and it won't let me write a range to an array)

5.A) Write a function that takes a 2D array of doubles, a single cell range, an optional cap and an optional floor.
B)Write the array on to the sheet with the single cell range parameter being the location of the top left of the array on the sheet. When writing the array to the sheet, for each value in the array where it is below the floor put the floor on the sheet, where the value is above the cap put the cap value on the sheet, otherwise display the original value. The input array should not be modified.
All code should be what you consider production quality.

Dim topleft As Range

array1 = Range("B8:C18").Value
'array1(1, 1) = 2
'array1(2, 1) = 3
'array1(1, 2) = 6
'array1(1, 3) = 9
'array1(2, 2) = 4
'array1(2, 3) = 5

View 9 Replies View Related

Forumla To Give A Starting Number And Take One Away Each Time A Code Or Codes Are Dislayed In A Cell Range

Mar 22, 2009

In 1 cell i need a forumla to give me a starting number and take one away each time a code or codes are dislayed in a cell range. Something like this

A1 = 23 days or any number days i needed

Cell range B1:C52

every time a selected 1 or 2 letter code appears in the cell range i want A1 to subtract 1 day from the starting number, i would need it to subtract half a day if one code appears ie HD, the codes may be P, OT, HD

View 4 Replies View Related

Write Current Time Next To Changed Cell

Sep 21, 2009

In my spreadsheet, I want a macro to write date and time everytime the user change a cell with a list validation. On the table, the E column contains the status of each row. I want to know since when the status is that.

View 4 Replies View Related

Function To Write Information To Another Cell

Jan 12, 2007

if there is an Excel function out there that will copy over the contents of one cell into another by what is typed in another cell. Did that make sense?

Lets say that I have info in

(A1) John (B1) Smith (C1)X (D1)

Now I want to be able to copy over A1 & B1 to another part of the spreadsheet/workbook if I were to type the words "leave" into D1.

So basically it would look something like this...

(A1)John (B1)Smith (C1)X (D1)leave (want info to go here---->) (M4)John (N4)Smith (O4)currently on leave

And then have it automatically add the names below the one in M4-O4. so it would add names in M5-O5, M6-O6, etc

I have this spread sheet that has over 1000 names on it & it would help out alot if I could just use a function that could copy the information to another part of the spreadsheet or another workbook.

I know that I can use the filter, but I may want to have this stuff on another worksheet alltogether.

Also, if this is possible, is there a way that it can be automatically removed if I were to delete the word "leave" from the cell?

View 8 Replies View Related

Use Closest Date To Find The Starting Mileage Of Car?

Dec 26, 2012

I have a list with all our company cars (300). I also have a list with all the transactions of the fuel cards (12000 lines). Now I need the find for every company car (exact match) the nearest fuel-consumption-date (closest match to the given starting date) and take the mileage of that transaction. I've added an example. I have tried linking carnr and date (like carnr&"#"&date) and match these, but I don't always get the right car number.

View 1 Replies View Related

Write Current Time Next To Changed Cell (without Updating It)

May 8, 2014

I need to record time next to eg.: W3 cell,

Now I'm using below formula :

=IF(W3<>"",NOW(),"")

but the NOW function keep updating time itself, is there any VBA code or function that I can use with this formula ?

View 4 Replies View Related

How Do I Write A Positive/negative And Red/green Function?

May 19, 2009

I'm trying to make a "weight-based" spreadsheet. I want to show a difference between numbers so if an item lost 5 lbs, there would be a "-5" and it would be in green font showing good.

For example, a box weighs 20 lbs and then drops down to 15 lbs. This would be a good result. So I would have 20 lbs in A4 and 15 lbs in A6 and I want to show the difference in A8. However, since I want the box to lose weight, I want it to show a negative value of "-5" in green font meaning it is good. And vice versa, I want it to show "+3" in red font if the box gained weight.

I can't really figure out how to get the signs working properly. I'm assuming to use an "if" function in where if the difference is a loss, show the negative sign and have it in green font. And if the difference is a gain, show the positive sign in red font.

View 2 Replies View Related

Write A Custom Made IFERROR Function

Aug 6, 2009

how to write a custom made IFERROR function which works on Excel 2003 that mimics as closely as possible the Excel 2007 IFERROR function without using any array formula.

View 2 Replies View Related

How To Write Macro To Use User Defined Function In Particular Column

Dec 2, 2013

In my spreadsheet, one user defined function i.e. pfizer is there which I want to convert into macro and use it in column H of sheet2 [sheets("sheet2").columns("H:H").select]

What should be the VBA code for this.

when I have started the macro with keyword as application. . the function is not populated.

-->I am able to populate the data with the formula like this = pfizer("I1")

View 1 Replies View Related

VLOOKUP Function: FIND The Number AND WRITE 'YES" TO OTHER COLUMN

Sep 25, 2008

ColumnA Column B ColumnC (Yes/No)
2121 345766
23423 6456546
4234 6456456
7567 64566456
76756 654645
67567 3344534
76575 34534534
756756 45345
7657 534545
756767 4534534
756756 435345


Hello,
What I am trying to do is

Search the number written at ColumnB in ColumnA and if found write YES to column C

if not write No

View 9 Replies View Related

Date/Time Formula: Pick Up A Date With Time Entry On A Worksheet And Place It Into A TextBox On A UserForm

Jun 17, 2006

I am attempting to pick up a date with time entry on a worksheet and place it into a TextBox on a UserForm. Format on the sheet is mm/dd/yyyy h:mm AM/PM. The UserForm is placing the value as mm/dd/yyyy 12:00 AM. here is the

Private Sub UserForm_Initialize()
If Not Range("dDate").Value = "" Then
TextBox2.Value = Range("dDate").Value
TextBox2.Text = Format(DateValue(TextBox2.Text), "mm/dd/yy h:mm AM/PM")
Else
TextBox2.Value = ""
TextBox2.SetFocus
End If
End Sub


"dDate" is the named range where the date is sitting. The format is also set on the TextBox2 exit event. Can anyone see why only the date portion is being transfered with the default 12:00 AM for no time component of the value?

View 3 Replies View Related

Repeat Amount For Number Of Columns With Month Name Starting From Delivery Date?

Feb 12, 2013

I want formula which can automatically populate the amount based on the number of months starting from the date vehicle is received. For Eg.

Nissan patrol Rent is AED 5800/- per month & we deliver it on month Sept 2011 for 24 months then i want excel to automatically populate AED 5800/- for next 24 months starting from Sept 2011.

View 5 Replies View Related

Create A Macro That Will Autofilter My Starting Dates In I To The Newest Date Entered

Feb 11, 2008

i wanted to create a macro that will autofilter my starting dates in I to the newest date entered. So ive recorded the macro: ....

View 9 Replies View Related

Userform Not Hiding Immediately?

Oct 9, 2008

I have a small userform with a ComboBox (ComboBox1) which, on a change event, kicks off another process. It's working fine, but the problem is that the userform hides immediately, and the open combobox remains visible while the second process starts running. It's only like that for about 5-7 seconds, but it doesn't look overly professional.

I'm using MS Excel 2007 on WinXP.

I tried putting in a sleep command or two, but that doesn't quite do the trick (the sleep is for 1 second).

View 2 Replies View Related

Match Date And Paste Certain Value If Not Write -9999

Dec 5, 2013

I have to range of dates, one for instance the regular year and the second one, the same year but with some gaps and data going along with. I am looking for a function that will take each date from the full year and searh for the same date in the range with a gaps and then take its coresponding vvalue if that date exists, if not it should write -9999.

so my date are as follows:

regular year
result should be like this here
year with gaps
values of years with gaps

[Code]....

View 3 Replies View Related

Convert Imported Date / Time Data To Date / Time Format?

Jan 2, 2013

I have loaded a .csv file in which the first column contains date/times, e.g. 01/12/2012 00:00. How do I now tell Excel (2010) that this is in fact a date/time format? If I select one or more of the cells, click on the Number dialog box launcher and try to pick a suitable format tghe cells resolutely refuse to budge from being text (i.e. left-justified, still allows me to edit the 'seconds' component to a number > 60). Also which data type should I be using? The only one that appears to have a full date/time format listed is Custom (not Date or Time).

View 4 Replies View Related

DATE Function & IF Function (return A TRUE Or FALSE Based On A Date In A Cell)

Dec 8, 2009

I am trying to return a TRUE or FALSE based on a date in a cell.

for example:

if cell A1 = 07/11/2009

I want A2 to show TRUE or FALSE if A1 is 14 days or more behind todays date.

I have tried stuff like:

=IF(A1=TODAY()-14,"True","False")

but it just always says false. EDIT: I have just noticed that if I change the date in A1 to exactly 14 days behind todays, it returns TRUE. So, it does work. Do I need to add a GREATER THAN in there?

View 6 Replies View Related

Immediately Change Back Color Of OleObject

Feb 3, 2008

When I click a Command Button I want a label to change color FIRST and THEN a message box to appear.

I use the following code, but what happens is: FIRST, the message box appears and THEN the label changes color, which is the wrong order. The label needs to change color FIRST.

Private Sub cbA_Click()
newcolor = vbWhite

ActiveSheet. OLEObjects("label1").Object.BackColor = newcolor

MsgBox "done"

End Sub

View 6 Replies View Related

Excel 2007 :: How To Write Macro For Set Expiry Date For File

Feb 26, 2014

How to Write a Macro for set a expiry date for Excel 2007 File.

View 3 Replies View Related

If-function Searching For Cells Starting With "abc"

Jun 26, 2007

I need an IF- function where true is returned to B2 if A1 starts with "ABC", i.e. A1 can be "ABCD", "ABCEF", "ABC G", etc.

In many databases an asterisk (*) can be used for these puposes, but I have no luck with that one.

View 4 Replies View Related







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