Cell To Reference Just The Month From Another Date-formatted Cell
Nov 11, 2009
I'm trying to link two different budgets into a third spreadsheet. The final step I'm attempting to accomplish is have an if-and statement reference just the month from a date-formatted cell. One of my departments tracks their budget on a daily basis, i.e.
11/2/2009, 11/3/2009, etc. rather than just 11/2009. I want the if-and statement to return the budget from all days in a given month so i can apply the formula to the whole year, broken down monthly too. I saw a question similar to this one but didn't see any responses so I'm not sure if it can be done.
I am trying to get a single cell to display the following:
Last Updated: 3/18/2008 15:08 (GMT+2)
Entering =NOW() in a cell displays the date and time as required.
But entering ="Last Updated: "&NOW()&" (GMT+2)" displays the date and time as a serial number. Formatting the cell to Date does not change the serial number to date and time format.
The only way I have found to get the desired result is to use =NOW() in another cell (F13), format that cell to general to get the date/time serial number, then use ="Last Updated: "&TEXT(F13,"m/d/yyyy h:mm ")&" (GMT+2)" in the required destination cell.
As I said this works, but it strikes me as an inefficient method. Is there a formula I can enter or formatting I can apply to get the desired result without using an addition cell?
The result needs to be in a single cell. Splitting text and date/time into 3 adjacent cells will not work with my worksheet setup.
I have a input box that prompts a user to enter a date of a new month - it has to be the 1st of a new month. I have validation that it is a date that has been entered but then i want to validate the date entered is a month ahead of a date in a cell range on a sheet.
It is a monthly reset so it has to roll on from the previous month.
Here is what i have currently but it isn't working.
Code:
' Get user to input the first day of the new month to populate all dates with dNewMonth = InputBox(Prompt:="Enter first Day of the new Month. Must be the 1st of the Month e.g. 01/10/2012", _ Title:="Enter Date") ' Validates the entered date is a valid date If (IsDate(dNewMonth) = False) Then
I have attached an example spreadsheet which should be relatively intuitive over me trying to explain it.
I am wanting to extract all CJ numbers with the corresponding dates from Sheet 1, into Sheet 2. It has to factor in, engineer name (as stated on sheet 2), the Month (as stated in sheet 2 "May") with the "Attended site" date in sheet 1....
If you see the worksheet it should give you the whole picture with a fair amount of clarity.
I am trying to develop a SUMIF formula that looks up a date mmddyyyy and only keys off the month in the range cells. Example: =SUMIF(B7,"August",E7:F7) B7 has the full date in ie. 8/10/2007 or 10-Aug-2007. My work around has been to separate out the date, month, and year into three different columns. Can you define the date by a range? Example:=IF(AND(B6>=8/1/2007,B6<=8/31/2007),SUM(E6:F6), 0) ... this doesn't work,
I have a column who's content is determined via about 6 nested if statements from data on that row. That cell is then conditionally formatted to a certain color based on the text that is ultimately printed from the nested ifs (simply an extra visual legend for the text). All of this contributing info and about 1000 lines items make a very large and difficult to print page. What I am trying to do is a make a summary sheet that simply takes the index number of these 1000 rows and copies or links the conditional formatting of the mentioned cell onto this number on another sheet. I have already linked this status cell and put it adjacent to the index number which works well in that with two columns I can show the index and status but if I could combine the color of the status cell onto the index cell, it would be even better. I am pretty sure another conditional format for this summary sheet would not be possible or be extremely complex since the contents of the index cell I am conditionally formatting have no bearing on the conditions for the format. Was hoping there is some VBA magic that could simply mimic the conditional formatting from one cell and put it on another.
Using 2007, I need to conditionally format a cell colour based on 5 other cell colours that have been conditionally formatted. The 5 other cells will be coloured either red or greem. What I want to do is have an overall status cell that would be show green if all of the other 5 cells were green, amber if 4 of the other cells were green and one was red and red if 3 or more cells are red.
I have a date as 1/1/11 format in a date-formatted cell A1 for example. I want to extract the month in MM format, i.e. January, or "1" is extracted as "01", etc and just place it into A2.
So far, I've found an option to use format function in VBA and "MM", but I'm not familiar with VBA yet.
That is what my spreadsheet looks like. I have about 130 in the sheet I'm working on now. A is my date cell, B is my total for that date, C is the cell I have made for the =Month(serial_number). The problem i'm having is how do I get it to not put a number in my "C" cell when there isn't a month present?
This sheet will change weekly, so I've went down to 300 with my month formula. When entering the formula in the cells that do not have the month, it automatically inserts a 1 that throws the count off for my entire sheet. How can I leave the code for my month in without having it add a number when there's no month?
I have two workbooks, one a database that accumulates data over time, and the other a monthly report that needs to be populated based on information from the database. When moving data between the two, the following works fine (snipped a lot for ease of reading):
As you can see, it simply puts the month from a cell in the database into the report workbook. However, if I change Range("A1") to Cells(1,1) I get a runtime error:
I can generally work around this issue by changing the active workbook, but doing so is a big pain. Is there any way to use the second bit of code without popping an error message?
In one cell the user has to fill in a date, example 20.3.2008 and then in another cell he/she has to choose a month from a list (january-december). I need a macro that checks that the month stated in the date cell is the same as the month selected in the other list cell.
I'd like to sum a range of cells if the date in the adjacent cell is last month, so... A2:A1000 holds the dates and B2:B1000 holds the values, i'm trying to figure out how to sum all of the values for the previous month (i.e. June).
I am using the MONTH function in a formula. The Month value of an empty cell is returned as "1". Why is this? Is there any way to return a null value or zero?
I have a pretty elaborate spreadsheet for my bills. One cell adds up all the bills due during a specific pay period using named ranges. The formula looks like this:
It works, but when I have to populate cells for upcoming pay periods, I have to go in an edit the dates manually. I'm lazy, and want to simply reference a cell with the date in it instead of typing the whole date out in the formula. What I'd like to do is this:
I'm using the following formula which is entered by using VBA on the worksheet change event but the cell reference 'A2' is not changing for each row, i.e. A3, A4 etc.....
Code: =MAX(IF( 'Device Use - 4 month Period'!$A$2:$A$20000=A2, 'Device Use - 4 month Period'!$C$2:$C$20000))
Using cell contents in formula to Populating cells with values from closed workbooks I am trying to create a summary table of data (e.g. orders) from previous weeks. In the table I am creating, the left hand column contains the Monday date of the week to be summarised along the row. I want the cells to show the values from other spreadsheets when those spreadsheets are closed, but I want the formula to pick up the date of the week that is in column A. I have attached a sample spreadsheet to try and make it clearer.
I need an IF formula, that states if a date is more than a month after the date in the cell then it is timely and if it isn't then it is not timely. For example the date in A1 is 12/11/05, if the cell is A2 is 13/12/05 (or any date after that) then A3 should read Not Timely, if A2 is 12/12/05 (or any date before that, including a date before the date in A1) then A3 should read Timely. Is there any way to do this?? At the moment I am having to go through manually and put in either Timely or Not Timely.
I have attached a copy of a spreadsheet that I am putting together, What I need to achieve is, when a date is entered into the completion date cell the daily count down in the days left cell stops but still shows the value in that cell. The Annual or Monthly cal tabs are the ones i need the formula for.
I've created a User Form to input data on a dashboard where you can select a date from a dynamic list of dates. The list of dates is calculated using:
Code: =(TODAY())-WEEKDAY((TODAY()),1)+2 The other dates are based on this date -7.
The User Form code:
Code: Private Sub CommandButton1_Click() Dim emptyRow As Long 'Make Sheet30 Active
[Code]....
This works perfectly for any date except dates from December. 3/12/12 (3rd Dec) turns to 12/3/12 (12th Mar) when it's copied to the cell. The same happens for 10/12/12 - becomes 12th October instead of 10th December.
Please refer to attached Sinking Fund worksheet. have managed to solve most of it. Just need to figure out how to match the periods out. My requirements are on the worksheet. 1. To get the schedule on sheet 1 to stop calculating further once it has reached the actual number of payment periods as shown in H12. 2. To get the interest calculation in sheet2 to stop once the actual number of payment periods as shown in sheet1 H12 is reached.
The spreadsheet attached is a timesheet I use. The last column on the sheet (IV) keeps a running total of time spent on each project. I need a way that i can find out how much time was spent on projects in specific timeframes (eg 01/01/09 - 07/01/01, or 01/01/09 - 31/01/09). my initial thought is perhaps i can have a "from" cell and a "to" cell to input the dates i require and it will total the relevant cells in the rows below.
NOTE! This workbook uses VBA to auto hide any column which are dates previous to today's date so you may need to unhide them to view times logged.
I have the below code to get the difference between todays date and the date located on sheet "requests" "B3". The code returns the value: -28040498
Code: Dim MyODateRng As String Dim MyODate As String MyODateRng = Sheets("Requests").Range("B3").Value
[Code]....
So i gues with the first code there is something wrong with the date formating. But i do not understand why the second code does not return simply return the value: 1.