Highlight Rows Of Current Week Line Items
May 9, 2014
I have a running list of to-do items sorted by date due (the dates are in the "C" column and start at row 9 to make room for some title info.)
VBA code that would highlight the rows of items that fall in the current week or next 7 days, whichever is easier.
View 10 Replies
ADVERTISEMENT
Mar 14, 2014
I have a spreadsheet where on a weekly basis data is copied in to various tabs. I then have a "formula" tab where I have a single line of formulas which look up the various data tabs and extract the results I want to show.
Currently each week, before I import the new data into the various tabs, I copy the last row in the "formula" tab and paste to the line below it. This contains all the working formulas. I then paste values only on the line that I copied, thus "locking in" the values it calculated with that weeks data. This means that each row then contains the results with that week's data, and this will grow week by week.
What I am looking for is a formula that automates this process. So let's say that row 30 is the final row of data on my formula tab, it contains the formulas I want to use. I would need a macros that does the following:
1. Looks up last row (row 30)
2. Copies last row (row 30)
3. Pastes to next empty row (row 31)
4. Pastes values only to second last row (row 30)
I'm not too great with writing macros, I've found plenty that can find the last row, but I can't get them to work to highlight that row.
View 5 Replies
View Related
Apr 20, 2009
Is there a snatch of macro that can assign two variables with the date for the beginning and ending date of the current week?
I need
A= 4-19-2009 12:00AM
and
B=4-25-2009 11:59 PM
Based on the current week being week 16, with the variables changing as the weeks progress.
View 9 Replies
View Related
Aug 20, 2007
Currently having problems getting correct head count. I have formula that works for rows 6-8 but fails in row9. The should be answers are in rows 17-20.
Conditions used in formula
*Start date > Start FY =0
* Current Week > End Date =0
* End Date < Start FY =0
The date difference is divided by 7 because there are 7 working days in a week. If it is greater then 7 then it would be 1 for current week. I tried zipping the file but I could not shrink it to required size. find on weblink below: http://maxupload.com/E759C9D9
View 4 Replies
View Related
Mar 17, 2013
The portfolio team uses data that is refreshed every Monday. Write a formula to obtain the current week's Monday's date.
View 3 Replies
View Related
Nov 3, 2009
I have a worksheet that includes a cell that gives the current week of the month, in the form of "Week #". I've been using the formula below for several months and have had no issues until this month, and it's driving me crazy.
Given that cell D2 is the beginning of the week (usually Monday, but at the first of the month it may be a different day):
="Week " & ROUNDUP((DAY($D$2)+WEEKDAY(DATE(YEAR($D$2),MONTH($D$2),0)))/7,0)
I'm not sure where the logic is going wrong here; it's worked so well up until now. For the week beginning November 2, 2009, the formula above returns "Week 2" rather than "Week 1".
View 9 Replies
View Related
Mar 6, 2014
i got a problem with date range.actually i wanna to insert date range automatically which is referring current week.
View 2 Replies
View Related
May 30, 2013
I currently have this beast of a code running in Excel 2013:
HTML Code:
Sub OBTAIN_RAW_DATA_MACRO()
Dim NextCol As Long
'Copy data
Workbooks.Open Filename:= _
[Code] ........
However the issue lies in that once the data is refreshed, the slicers reading off the above raw data/pivots, automatically select all weeks, however this is not beneficial for the data being presented.
Is there anyway to have, once the Pivots have been updated, for the macro to then check and select current week range (beginning Monday) only?
View 4 Replies
View Related
Jan 23, 2014
I have a calendar where the months are listed at the top of the columns and the day of the week is listed in the row. The months and dates are all formatted as a date (Jan is 1/1/2014).
______Jan___Feb___Mar...
...
Tue____7_____4_____4
Wed ___8_____5_____5
Thu____9_____6_____6
I just need to highlight the cell with the name of the month if it is the current month. I'd prefer to use conditional formatting.
View 6 Replies
View Related
May 15, 2014
i have been using the following function for quite a long. Now i want to make this an add-in, how can i do it.
---------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlColorIndexNone
ActiveCell.EntireRow.Interior.ColorIndex = 15
End Sub
---------------------------------------------------------------------------------
if this doesn't work, any other way of getting a add-in that can highlight current cell.
View 2 Replies
View Related
Oct 12, 2007
I've got a chart showing values for a set of dates. Can I highlight dynamically the data point on the chart with a specified date? I've fiddled around with formatting but suspect I may have to resort to some code..
View 4 Replies
View Related
Jan 4, 2008
My problem is I have a sheet thats structured like this:
Purchase # Item AMT
3630130685 10 20,503.04
3630130685 20 12,814.40
I need to add all items of a po to line#1.. is there a easy way to do this??
View 9 Replies
View Related
Feb 23, 2013
I have the data to import / read in a pdf, in a doc, or in an Excel worksheet whichever is easier to use. I need to import the data, parse it into the correct cells for that row and then repeat the import until the end of the file. Not all the cells are in each group of data to import, so those cells will be null for that row. Some of the data for one cell may be in up to 14 lines in the data file. I have be concatenating these data rows into one cell. There are 48,000 lines in the file to import or I would do this manually. I am assuming that doing this in VBA would be the most efficient method.
View 11 Replies
View Related
Apr 7, 2014
I want to create a dynamic line graph using week and year numbers stated in another sheet.
e.g.
Start Year - 2012
End Year - 2014
Start Week - 3
End Week - 12
The top 2 rows above my graph data are as below:
Year - 2012 2012 2012
Week - 5 6 7 etc.
This works fine if the start and end year are the same but if it's greater than one year, it doesn't recognise that.
View 7 Replies
View Related
Oct 15, 2013
Formula to conditional format to highlight all the dates only showing 2013?
View 3 Replies
View Related
Oct 8, 2008
I have a macro that displays a calendar with code to highlight the current date, but this part of the code does not work and the current date is not highlighted.
View 14 Replies
View Related
May 4, 2006
I am now wanting to do if the the cell has an active conditional format also highlight that cell. Currently if the cell has an active conditional format nothing happens
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static rngPrev As Range, PrevColor As Integer
Dim TempColor As Integer
TempColor = Target.Cells(1, 1).Interior.ColorIndex
If Not rngPrev Is Nothing Then rngPrev.Interior.ColorIndex = PrevColor
PrevColor = TempColor
With Target.Interior
.ColorIndex = 35
.Pattern = xlSolid
End With
Set rngPrev = Target
End Sub
View 8 Replies
View Related
Feb 12, 2014
As per attached file, there are altogether 4 sub-files and 1 master file.
I'll need the code to automatically pick up the top 9 revenue(highlighted in Green) and top 9 EBIT(highlighted in Yellow) by values in Column N from 4 sub-files and paste to the master file.
Attached File : Example file1.xlsx‎
View 9 Replies
View Related
Jan 25, 2013
I have roughly 3-4 million rows of data that i need to collate for data analytics. I'm using Excel 2010 and saw that the max it will go it just 1 milllion + lines.
View 6 Replies
View Related
Sep 19, 2007
Is it possible to display both the current code line number and the total line count of a macro while it's running?
I was thinking it would be handy for a progress indicator if the ProgressBar max value could be set to the LineCount total of the procedure and each line of code would increment the progressbar as the macro ran.
View 9 Replies
View Related
Oct 27, 2011
I am trying to automate the creation of 3 pivot tables. At first I was having a problem with deselecting all items in the drop-down except one, then I found the code to fix it.
I replaced this code:
ActiveSheet.PivotTables("PivotTable15").PivotFields( _
"Beta")
.PivotItems("Escalated").Visible = False
.PivotItems("Hang Up").Visible = False
.PivotItems("New Hire Requests").Visible = False
.PivotItems("No Trouble Found").Visible = False
.PivotItems("Priority Exchange").Visible = False
[code].....
This fixed the problem, but there are still two other pivot tables that need to be created after this first one. I scrolled down through the code and deleted the other code blocks for the selection of the PivotItems and replaced it with the code above, but then when I ran it I got the "Compile Error: Duplicate Declaration in current scope".
I read more through the forum and realize that it's because VBA is dimensioning it twice, and I read that you're supposed to Dimension at the beginning of your program, but how do I implement this into my coding?
I can't dimension literally at the start of the code, there is some formatting that needs to take place first. (Basically I paste in a bunch of data into Sheet1 of my workbook, center it, space it out, then insert a pivot table into the pre-existing Sheet2 based on that data, filtered on the blank entries in Column N. Then I need to create ANOTHER pivot table based on that same data in Sheet1, but filtered on the blank entries in Column O. Then I center the words in the Pivot tables' headers in Sheet2, and finally I need to create one last pivot table on pre-existing Sheet3 based on the data on Sheet1, filtered for 2 specific entry types in Column N.)
View 2 Replies
View Related
Oct 26, 2006
Is it possible to get the current Page Item Selected for a pivot table
I've tried the following functions in VBA, but have had no success
CurrentPageName
CurrentPage
CurrentPageItem
ParentItems
View 9 Replies
View Related
Dec 14, 2013
I do not have any VBA knowledge. However, teach/show me how to write a macro to convert each new record (with a date range) into individual records for each day in that date range. It might take me a long time to learn from you but I really don't mind trying and putting in the effort. My description of the idea is shown below.
The intention is for new records to be added each time a staff/member has a new travel trip. Each new record = new row added below the last record previously added. DateRangeQ_1.png
With the macro, I hope to be able to add each new record to a separate list. This separate list shows those travel records by each individual date and staff/member name. The dates do not need to be in chronological order. DateRangeQ_2.png
So if Mary Jane enters a new business trip to Egypt for 15th Dec to 17th Dec, she will enter a new record in row 9, click the macro button and the macro will generate 3 new records in rows 31, 32 and 33 (one row for one date in the trip).
View 11 Replies
View Related
Apr 11, 2014
The code as it stands allows me to push a button and it immediately picks up on a meeting category and date of meeting, then sends emails to those that are supposed to attend based on a date that is within 7 days from the current date of pressing that button. HOWEVER; it seems to still send the email when the date has passed...is there a line I can put in this code to make it so that every date that has already passed will be discounted from future emails?
The code is as follows:
[Code].....
View 1 Replies
View Related
Aug 9, 2014
I have a userform in excel....the listbox "listbox1" has over 1000 items....and i have a label "label5" also.
What i want is if I select for example 10 items from the listbox1 to be shown in the label5 directly....and of course if i select or deselect any item will be applied in the label
For example...selected items from listbox are;
5
6
7
8
9
the label will show me the same
5
6
7
8
9
Code while noting that the list box has many columns...so i want to select which column to be appeared in label.
View 2 Replies
View Related
Dec 5, 2007
I have an excel spreadsheet which calculates the count and value of line items based on a report. I use the sumproduct function to calculate this as it involves multiple criteria. The formula is use is
SUMPRODUCT(('Report 50'!$C$2:$C$64992= Dashboard!$B172)*('Report 50'!$H$2:$H$64992=Dashboard!G$2)*(LEFT('Report 50'!$S$2:$S$64992,14)="credit transfe")*('Report 50'!$L$2:$L$64992=15))+SUMPRODUCT(('Report 50'!$C$2:$C$64992=Dashboard!$B172)*('Report 50'!$H$2:$H$64992=Dashboard!G$2)*(LEFT('Report 50'!$S$2:$S$64992,14)="credit transfe")*('Report 50'!$L$2:$L$64992=19))
I think the possible error is coming out of this criteria (LEFT('Report 50'!$S$2:$S$64992,14)="credit transfe")
Out of one particular field i am picking those line items in which the first 14 characters are "Credit Transfe", if i eliminate this criteria i dont get error.
But this is the main criteria for my calculation. Most of the time i dont get any error , but sometines i get the # Name Error? When i double click on the cell it goes to one column. I dont know what to do from there.
View 2 Replies
View Related
Mar 14, 2014
I have an excel sheet wherin there is a column that has the data where in the dates are displayed and many other columns.
I get this excel every Thursday so i want to filter this date column in such a way that it give me the data related to the date of the previous week only yet there is a catch here. When i say previous week i mean.
Suppose today is 03/14/14 then i want the data from 03/07/14 till today ie Last week friday to this week full( so cant use Current week option) and then paste it in a new sheet.
I tried the Record part but in that it is taking a hard coded value as i am selecting the date myself. I dont want to change the date manually every time.
this was the macro that was created
Code:
ActiveSheet.Range("$A$1:$BX$58").AutoFilter Field:=1, Operator:= _
xlFilterValues, Criteria2:=Array(1, "3/10/2014")
Range("A59").Select
ActiveCell.FormulaR1C1 = "=COUNT(R[-4]C:R[-1]C)"
Range("A60").Select
View 8 Replies
View Related
Jul 12, 2009
I currently use the following formula in Conditional Formatting to highlight a persons birthday:
=$R1=DATE(YEAR($R1),MONTH(TODAY()),DAY(TODAY()))
which changes the colour of the cell on their birthday. However, I need to amend this formula so that the highlighting applies to the current week, as in Sunday thru to Saturday. My amendments have not been successful and you cannot use the WEEKNUM function in conditional formatting for some reason!
View 4 Replies
View Related
Apr 16, 2009
I have a spreadsheet, in which I need to lookup invoice numbers from a raw data file with ~5,000 line items on a daily basis. The lookup is based on two criteria searches (1) search product type (2) search product make. In this example, I have 4 product types:
1 – car
2 – truck
3 – boat
4 – motorcycle
For this example I want to search invoices; (1) first search for cars only (2) search for product make. In my attached example, the first item (cell E2) would return invoice number 7147875-FRD from the raw data file. The second item (cell E3) would return invoice number 7147877-NSN.
View 2 Replies
View Related
Jul 10, 2014
I have a spreadsheet for tracking jobs. Most everything is based off of week # rather than date. I am trying to get the stats page of the workbook to tally the total number of late jobs per week.The current week is taken care of because there is a function that automatically displays on time yes or no and I just set it to count the yeses or nos.The problem I am having is for past weeks.
I tried- =COUNTIF(Table2[On-time],"No"+(CountIF(Table2[Week # Hidden],"<Weeknum(Now())" but that doesn't work. I also tried isolating the < like this. =COUNTIF(Table2[On-time],"No"+(CountIF(Table2[Week # Hidden],"<"Weeknum(Now()) and that did not work either.
------ UPDATE
In response to using CountIFS I have also tried-
=COUNTIFS(Table2[On-time],"NO",Table2[Due Week '# Hidden],"<Weeknum(Now())") this just returns a zero value even when I have a late job listed three weeks ago.
View 10 Replies
View Related