I am trying to have excel Look in column A for either a date, or a date range. if the date = the correct date, or falls in the date range then I need excel to look in column C for a specific word. If the date matches, AND it finds the word in column C, I need it to count them. I preferably like a date range, but if I need to do each individual date, that is fine too.
Example:
8/1/2009
Video
Account Research 8/1/2009
Video
Complete Work Order 8/1/2009
Video
Account Research 8/1/2009
Video
Account Research 8/1/2009
Video
Complete Work Order
I need it to recognize 8/1/2009, and once it sees it, then check to see if there are any "account research" in column C, and then count all of them.
One more issue - Column is not just a date - it has a time stamp: 8/1/2009 11:15:36 AM. so I has to be able to just look for the date, not the time.
I have a listbox with 8 columns. Multiselect is enabled, and it must stay this way. As part of my program, after the user presses a command button, I need to use the row indexes of the selected rows in order to copy the selected information into an array which is then placed in a different listbox, and then delete the items from the original list. Pseudocode of what I want to do:
[Code] .....
But my understanding is that .ListIndex does not work this way with multiselect listboxes. I've tried searching for a solution for a while, but I cannot find one.
Actually i am going to be mad soon if i cant fnd a solution. I need help on a subject.
i have many sheets, more than 200 in a workbook. Each sheet is eaxctly same format and just the numbers are different.
lets say
sheet 1 A1- Manchester A2- London A3- Leeds
sheet 2 A1 - Istanbul A2 - Ankara A3 - Izmir
I want in sheet3 with a macro, when i put the sheet number in a cell, next cell will show A123. I mean; sheet 3 when i put A1 as "sheet 1" i want the text in A2 written "Machester; london; leeds"
or if A1 is "sheet 2" than A2 should write "Istanbul; Ankara; Izmir"
I have a macro that someone else wrote. it is suppose to combine multiple sheets into one. the problem is that when it combines the information it is adding rows between the info. I would like it to just put the info on the next available row and begin there. here is the macro.....
I have a large keyword list in a sheet called "AllKWs" In ColA from A3 downwards).
What I'd like to be able to do is this, which I'm sure will be complicated, but I will explain.
Say keyword phrase sheet has 25,000 rows of data (could be more/could be less). I click an assigned macro button. A pop up box appears. I type in a word or words I'd like some info on, so for example I type in a word or words like "car rent"
It then returns for me on a new sheet called "Multi Keywords" a lot of data on this sheet, which would hopefully be as follows:
All Row 1 will contain Column headings All row 2 will contain Total Counts (I'll explain in a minute this row)
So, all data to be returned from Row 3 downwards. OK, as to the data to be returned. All returned data In all Columns to show data in descending order by No of occurrances/appearances
Col A (From A 3 downwards) = The actual number of 2 word appearances (In this example that contain the words "car rent"
In Col B = All 2 word Phrases Containing ("In this example "Car Rent") (As a note, In this example, ColA (CellA3) could only show the number"1" and ColB (B3)could only show the phrase "Car Rent") once. (As there isn't no other possible combination).
In Col C =The actual number of 3 word appearances listed in descending order That contain the word "Car rent"
In Col D =All 3 word Phrases Containing "Car Rent"
In Col E =The actual number of 4 word appearances containing "Car Rent" listed in descending order
In Col F =All 4 word Phrases Containing "Car Rent"
In Col G =The actual number of 5 word appearances listed in descending order
Actually if anyone can crack this I really do take my hat of to them. OK,A few more points,
Cells B2,D2,F2,H2,J2,L2,N2,P2,R2, All contain the word "Total:" and if the macro can fill in the number as appropriate.
So for example Cell L2 (For 7 word phrases) would say something like "Total:42" (If in Col L From L3 downwards the macro found 42 7 word phrases that contained the words "Car rent"
Ok, Cells A2,C2,E2,G2,I2,K2,M2,O2,Q2 All these cells will contain the word "Total". So these cells would list the combined total number of occurrances of all the phrases. So for example cell K2 might say "Occur:324" as the total number of occurances of 7 word phrases that had the words "Car rent"in.
OK. as an example, I will post a code that Jindon wrote for me sometime ago. I'm posting this now, as it is very similar in what I would like this macro to be able to do, and might help as I'm sure this 1 will be complicated. This 1 looks for a phrase, returns by No of occurrances etc, but for all the combinations (Word lengths) within the Keyword phrase list, rather than what I'm asking for now, which splits them into Number of words columns.
Here it is anyway:
Sub NicheKeywordFinder() Dim a, dic As Object, X, myTxt As String, b(), c(), n As Long, i As Long, e, s, myTotal As Long myTxt = InputBox("HuaHinCarRental - Niche Keyword Finder") 'change to suit If Len(myTxt) = 0 Then Exit Sub Set dic = CreateObject("Scripting.Dictionary") dic.CompareMode = vbTextCompare ReDim b(1 To Rows.Count, 1 To 1): ReDim c(1 To Rows.Count, 1 To 3) With Sheets("All KWs") 'change to suit a = .Range("a1", .Range("a" & Rows.Count).End(xlUp)).Value End With
In col A (from A2 and down), I want to run a Countif on a Range of concatenated values in Col B (B2 and down)
I'm having trouble with the Countif part of my code
Sub countifDataRange() Range("A2").Value = Range("B2") Dim LastRow As Long LastRow = Range("B" & Rows.Count).End(xlUp).Row With Range("A2:A" & LastRow) .Formula = "=COUNTIF(Range("B2:B" & LastRow), "B" & Rows.Count)" .Value = .Value End With End Sub
I'm using the SUM, COUNTA and COUNTIF functions in a macro. The SUM and COUNTA works but the COUNTIF function does not return results.
Sub B_Test() Dim myRange Dim Results Dim Run As Long myRange = Workbooks(1).Worksheets("Master").Range("S6", Range("S6").End(xlDown)) Range("M3") = Application.WorksheetFunction.Sum(myRange) myRange = Workbooks(1).Worksheets("Master").Range("D6", Range("D6").End(xlDown)) Range("D3") = Application.WorksheetFunction.CountA(myRange) End Sub
I have tried countless ways to rewrite the COUNTIF line with no results or compiler errors returned. Originally had problems with the SUM and COUNTIF function and found that column formating was the problem. After clearing all column formats, the SUM function promptly began working but the COUNTIF keeps eluding all my efforts. The column which the COUNTIF is pointed to contains values of 0 to 500. Only values greater than 0 are to be counted.
I need a macro to identify when cells are >= 90% in a range, and count them. Then put the result in cell Z58. Range is I51,L51,O51,W51,Z51. i.e if all cells are 90% then put value of 5 in cell Z58. Here is code i have that isnt working:
Is it possible to use a "countif" function as part of a macro?
Here's the situation. In workbook "A", I want to look at a range of cells ("O19:O248") and count the number of times "apple" appears within that range. If "apple" appears 20 times, I would like the variable v_applecount to = 20 so that I can call that variable in workbook "B"
Note, I essentially want to do something like this in the Macro:
What is the best method for searching and replacing within a string when the string to be replaced could be say 1 of 10 options and could appear in any position within the string ? To make it easier let's say wherever those sub strings appear they are to be replaced (ie none to be left behind), and lets say they are all to be replaced by another character -- specific to each string being replaced.
Example:
Say I want to replace any digits in a string, to be replaced like for like as follows:
0 -> a 1 -> b 2 -> c 3 -> d 4 -> e 5 -> f 6 -> g 7 -> h 8 -> i 9 -> j
Sample strings:
Luke is 0 Donkey Luke is 0 Mul4 0nd Luk4 is not very cl4v4r Luke can not h40r very w4ll.
I am trying to sum the error points of staff in their work done based on a specific time frame. For example,from 4.00pm to 4.30 pm as per the attached. I tried sum product but did not work. Is there an addition formula that I need to use when incorporating time ?
In the attached file I managed to sum up the Quantities per Material & Category. The Original DATA is presented in columns A:E. The requested results/Formulas are at Cells B2:B4. My Question is very simple: Is there a way to sum up the Quantities WITHOUT the Help-Column G !? If so - how ?
I have a 2-column employee file. Column A has the employee id and column B has the manager's employee ID. The reporting layers can get pretty deep. In this example, there are 6 layers of reporting. For example, Employee id 1200 (which is not in column A) has 2 employees. One of them (1712) has several employees, one of whom (1680) has employees reporting to them and so on for several levels.
Is there a way in Excel (2003 or 2007) to summarize the reporting structure? For instance, I need to know all of the employees that report up through emp id 1712 - not just that report directly to 1712, but all those under 1712's tree.
formula to calculate the commission based on 9 cases each case is subjected to 4 differant arguments.
here is the formula for the first case (the answer if true 1.4) & the last case( if all the casses are fails it should show 0.6) u will find it in cell K5
=IF(AND(E5>=20,H5=1,I5>=80,J5>=80),1.4,0.6)
this is only 1 case HOW can i calculate it basd on 9 casses??
I am currently using the formula below to lookup a name and its corresponding code. I type the code into cell A13. The name is fixed at B1. This formula then finds the name (B1) in a table and matches the column header of the code which I type into A13 and returns a value. This allows me to type in different codes and quickly see the value corresponding to the name. I also want to be able to type the coding into A13 and be able to see a listing of all of the names attached to that coding.
is ther away of usin 1 button to open any 1 to 46 worksheets i know i can make a button to open a sheet with the command sheet2.activate but this means i would have to have 46 buttons on the fron page and thats to many
Usually when I select a number of cells with my cursor excel adds up the cells and shows a total on the bar. It's stopped doing this now and will only show the 1st cell showing "max=No"
See attached example for reference - I am trying to calculate an average if it meets 2 conditions, i.e, calulate the average for the Lead Time column if it is a Bag and On Time. Hope you guys can come through as always!
What i would like to know is, In the code im using to make a phone call from a userform the varibles are set in each and every sub. It all works well though could they be compressed into only being used once like an option variable or somethink like that.
i know that more that one variable can be decleared at the same time of the same type "dim x, Y, z as long.