Querying Text Ranges
Apr 5, 2007
I've been racking my brain for hours over the past few days trying to compile a spreadsheet for work. Currently the spreadsheet covers all the aspects of a auto loan process. It is used as a tool for auditors to check the work of others. The spreadsheet simply uses "P" to designate "Pass" or "F" to designate "Fail" on whichever section.
How do I reference the P's and the F's in the spreadsheet? I've had trouble getting excel to query any text in cells. Also, each loan application is started on the next line, so I need to make sure these formulas repeat as a new line is started - how would I go about doing this? Currently - Cell G3-CG3 contain the "P's" or "F's" - the formula I had used was {=IF(G3<>"P","FAIL","PASS")} - which does work, on a single cell. However, if I try to add the entire range in {=IF(G3:CG3<>"P","FAIL","PASS")} the cell returns #VALUE. Obviously, I'm inexperienced with excel in this fashion, and I need to know what formula I should be using.
View 10 Replies
ADVERTISEMENT
Aug 13, 2009
I have used several IF and AND functions in the past in order to check to see if 2 values = true and return a third.
(for example =IF(AND(A1>10,B1<20),C1,"")
However I can't seem to figure out the senario below.
I have 2 coulmns, Column A has dates and Column B has a numeric value
I need to check to see if column A falls between 2 dates and returns the sum of column B
For example if have 100 rows and 10 of those rows have dates that fall between 06/01/09 and 07/01/09 then add up column b for those 10 rows and return the value.
View 3 Replies
View Related
Jul 28, 2014
I am trying to set up a query to search a date range within a table in one sheet based upon a more narrow date range in a second sheet AND return a simple count, median currency value or value based upon a ratio (see attachment).
Note: the Sale Price, List Price and Supply values will be based upon the filtered date range (each quarter) and return a value based upon that range. The Sale Price and List Price also need to be a median within each quarter value so I can chart the data.
Help.pdf
Here is what I need to return:
Num Sales - simple count from each quarter
Num Listings - simple count from each quarter
Sales Price - median value within each queried date range
List Price - median value within each queried date range
Supply - numeric value based upon absorption rate, supply = listings each quarter / absorption rate (absorption rate = sales each quarter / months each quarter)
View 5 Replies
View Related
Apr 16, 2007
I'm struggling to find a way to index data in an array that meets certain matching criteria. I am looking for an employee's rate on a given day by searching a database that lists the dates that an employee's rate was changed. I was hoping to solve it with a crafty index and match array formula but have been unable to find something that works so far. I have attached a simplified example of what I am trying to do.
View 2 Replies
View Related
Feb 27, 2014
I am trying to retrieve the "option" values and "inner text" from two dropdown lists on a website. Using the code below I can retrieve the data from the first list but the second dropdown is not populated until a value is selected in the first list.
Firstly, is it possible to specify a particular "select" element by using its "name" or "id" and if so how? Secondly, will I be able to populate the second list by looping through each of the values from the first list and retrieve the second list values each time?
I have been searching all day so far and cobbling together bits of code that I have found that do some but not all of the process I require.
[Code] .....
Below is a small section of the results so far. The second dropdown list will give the models based on the value selected in the first dropdown.
inner text value
Alfa Romeo 53
Aston Martin 69
Audi 16
Bentley 87
BMW 17
Chevrolet 77
Chrysler 54
Citroen 18
Dacia 92
Ferrari 95
Fiat 19
Ford 20
Honda 22
View 13 Replies
View Related
Jun 6, 2008
I have a list of stores (A1:AX) and corresponding customer affinity numbers (B1:BX). Each time a customer visits a store with her affinity car, a record is generated. So the data is quite simple - two columns.
A sample of my list:
StoreCustomer#Phl01180Det01808Nash02118Phl02542Hou02TE2Atl03094
The tricky part (as always) is the output. I would like to divide the customers into three groups:those who visit only 1-3 stores
those who visit 4-7 stores
those who visit more than 8 stores
I would like to create a way to view a list of stores in column A and see how many of its customers are in each of the three groups listed above. Does that make sense? Output might be:
Multi-Store CustomersLowMediumHighPhl23188Det240322Nash123489Phl3498790
View 9 Replies
View Related
Mar 19, 2008
I currently have an Excel file with the ODBC connection and using my own SQL. Doing it this way would require the super user to go into each sheet then to the SQL each time to change the dates. I know there is a way to allow them to simply change the dates in cells H1 (or H1 and H2) then refresh data and whoolaa it would be updated.
My goal if possible via this board and all the knowledge available would be to have a spreadsheet allowing a super user to change the date in Cells H1 and H1 & H2 on sheet Tst1 and have the data returned to sheets (Tst2, Tst3) based on my own SQL statements.
Here are some parameters that I think you might need to know.
(And as you may guess I do not have much VBA experience so if at all possible use my naming convention shown below. and feel free to write for a first grader.)
User Name (not actual): "UID"
Server (not actual): "DEV"
Password (not actual): "PWD"
File Name: Excel_ODBC.xls
Sheet Name: "Tst2"
"Tst3"
Output Cell: "A1" for both sheets.
Oracle table name: UAB .................
View 9 Replies
View Related
Sep 17, 2007
I m trying to write a macro which could take the text from a single column row T2 to row T313 and write it to a .txt file. Have the .txt file name created by the text in T4 or I could also put the text to name the file in T1 if you think it would be easier.
Then carry on to the next named sheet and produce another .txt file in exactly the same way until all 15 sheets have been completed. It would also be helpful if prior to starting to write each text files, it could test for any text in cell A2 of the sheet. The first empty A2 cell of a sheet would determine the end of the run, if it was prior to sheet 15 being reached.
View 2 Replies
View Related
Mar 17, 2014
how to count a specific text in two different ranges eg a text "moby" ....want to count how many times it comes in ranges b4:b20 and in b50:b70
View 3 Replies
View Related
Aug 22, 2012
I have a series of values in one worksheet across one row. The row contains "Yes" or "No" text and also some currency or other number values.
My spreadsheet looks like this (the blank shown is a cell that has no value or text):
Yes No Yes No (blank) Yes No $100 50% 5
What I'd like to do is to have a VBA code that assigns a value to each of these text and numerical values by the following criteria:
If Yes, Value = 0
If No, Value = 5
If "Blank", Value = 0
If $0 to $25, Value = 1
[Code] ........
Therefore, I want to have the outputs in another worksheet (sheet 2) and it should show the following numbers based on the criteria above:
0 5 0 5 0 0 5 4 2 1
View 1 Replies
View Related
Mar 9, 2009
I have attached an example sheet to help visually explain what I am going to try and articulate. Cell A2 and B2's values result in cell E2, Cell C2 and D2's values result in cell F2. The same is true for row 3.
So what I would like to do is, based on the predetermined ranges of the Height+Chest Columns, auto complete column E, and Columns C+D, auto complete column F. My problem is that I cannot simply cell A + B = E, because the maximum range of one layers the minumum range of another. An example would be Maximum of A+B is 101 to result in SXS in Columm C, but the minmum A+B to get a SS in column C would be 97. So what I need is, for another specific example:....
If cell A2 is between 57 and 65, and cell B2 is between 31 and 36, then Cell C2 must be SXS. If Cell A2 is between 66 and 68, and Cell B2 is between 31 and 36, then Cell C2 must be SS.
View 5 Replies
View Related
May 14, 2007
I have been copying the work sheet ranges
"Consolidated Data" D4:K17
"Support Schedule" D5:W504
"Tangent Calx1" D4:F34 , J4:J34 and M4:M34
"Tangent Calx2" D4:F34 , J4:J34 and M4:M34
To a seperate worksheet for export to a txt file {for saving}
Then {when required} importing the txt file data into the worksheet ,copy the data back to the worksheet ranges and re-calculating the data. I have struggled to trying and butcher the code and delete the copy stage and write just the required ranges to the txtfile.(And reverse)
View 8 Replies
View Related
Oct 25, 2007
I need help creating a macro that will search through my excel spreadsheet and for every instance where column A isn't empty it should cut a range of columns from that row and paste them in a different range of columns in the row before it. It should then delete the row that it cut the columns from and keep searching until it has done this for the whole worksheet. I can modify which range of columns are needed, but it has been so long since I've worked with excel macros that I haven't been able to do it.
View 5 Replies
View Related
Dec 21, 2007
I have a excel file that I enter information into. I have code that saves the files to a certain folder with the name, date, and time stamp for the file name. At the end of the day I might have 3 to 15 excel files I have created that day and I would like to take information from certain cells (examle: L3, B6, B7, B8, G8, and so on) and create a txt file with all of the information in it.
Example:
12/20/2007
Your Name
123 Somewhere St.
Here, OH 45111
Home Visit
12/20/2007
Someone Else
345 Anywhere St.
There, OH 45211
Hospital Visit
View 9 Replies
View Related
Feb 26, 2010
definitions for static ranges and dynamic ranges?
View 9 Replies
View Related
Mar 7, 2013
I have two vertical ranges that I need summarized into 2 adjacent vertical ranges.
"
A B C D
| SUMMARY
model qty| modelqty
1 4.12922.0000| 4.12952.2000
2 2.000012.1250| 2.000025.1250
3 4.12929.0000| 318.0000
4 318.0000|
5 4.1291.2000|
6 213.0000|
"
A1:A6 is my SKU's model number B1:B6 is my inventory C1:C6 should contain formulas that result in a summary of the models D1:D6 should contain formulas that result in a sum of the inventory count for each model
View 1 Replies
View Related
Nov 1, 2006
In the attached file, I have variable range in column A:B, column C:D and in column E:F
I want a macro to do the following:
Start with sheet "A", select the available range in column A
then copy and paste in the sheet "B" but with all the cell values added with the value in H1.
Then in sheet A, simply copy the available range in column B and paste it in sheet B
Do the same until column F in sheet A. Pastespecial if it is odd column. simple past it is even column.
I know the macro code for the simple paste. But I am struggling with the paste special code.
View 9 Replies
View Related
Apr 28, 2014
I have written this macro to convert into a csv file to run for all defined named ranges in the activesheet. It run jst perfect when I hit SAVE button and it creates that many different CSV files for each named range.
However I am trying to use same macro in the another file and the problem I am facing is there a lot more named ranges and I want to run the macro for only selected NAMED RANGE. In this case 2 Named Range / 24 Named range.
What part of code do I need to change and to what to make it work for just 2 named ranges ?
View 6 Replies
View Related
Oct 14, 2008
1. Search an excel sheet "column" for a particular type of text and insert values based on that text (if found) in another column.
e.g I have column A1 to A10 with different types of text. I would like to search for the keyword "Risk is high" OR "Risk=High" for each cell in the column and insert a "1" if found beside it's corresponding "B" column. If not found, I would like to insert a "0".
So, if the text "Risk is high" OR "Risk=High" was only found in A6, I would like B6 to be "1". Rest of the values in the B column would be "0's", since the text was not found in any of the other cells.
View 10 Replies
View Related
Nov 21, 2007
I have a macro which imports data from a mainframe dump text file and performs 'Text to Columns' on the imported data so that formula in the spreadsheet can act on the data. The code works perfectly well when I use it, but if a different user logs on and performs exactly the same mainframe dump and import macro the Text to Columns action splits the raw data in a different way and the result is that the split renders the formulae useless.
I've experimented a little and for some reason it appears that the 'Field Info' parameters which are produced when the Text to Columns function is recorded in a macro differ between users even though the raw data is exactly the same.
FieldInfo:= _
Array(Array(0, 1), Array(18, 1), Array(35, 1), Array(56, 1), Array(70, 1), Array(88, 1), _
Array(102, 1))
View 6 Replies
View Related
Jan 11, 2010
I am trying to locate a named range cell in my VBA macro, but find that VBA will only allow me to specify the actual cell eg. Range("E2").
The piece of code I am using below is
Sheets("sheetname").Select
Range("E2").End(xlDown).Offset(1, 0).Select
I would like to use
Range("namerange").End(xlDown).Offset(1, 0).Select
Do i need to Dim or specify the name range in any particular way.
View 9 Replies
View Related
Oct 14, 2006
I'm trying to get a formula to give and yes or no answer if a cell is between two numbers.
Example: Cell AB9 = 100.2 in cell AB11 would be a formula that would answer "Yes" because it is between 96.8 and 100.4. Any number outside this range would answer "No."
View 3 Replies
View Related
Apr 10, 2013
I'm trying to get something like - If a cell contains certain text AND certain text then display set text OR If a cell contain certain text AND certain text then display set text.
For example:
Vauxhall Corsa 1.5Litre Petrol = vauxhall corsa petrol
Vauxhall Corsa 1.5Litre Deisel = vauxhall corsa Deisel
Vauxhall Nova 1 litre Petrol = vauxhall nova petrol
So it the formula is effectively searching for the car type and the fuel type and then returning the relevant set text. So far I'ver only been able to find IF functions criteria to identify one feature of the text.
I'm thinking it's got to be variation on =IF(ISNUMBER(FIND("Vauxhall Corsa",A1)),"Vauxhall Corsa Petrol") but there should be something else in there like =IF(ISNUMBER(FIND("Vauxhall Corsa"&"Petrol",A1)),"Vauxhall Corsa Petrol")
I know this is wrong but just trying illustrate my thinking. I need it to pick up vauxhall corsa AND petrol. I understand that I would have to stick a lot of IF functions together in a string, but that is fine as long as I can ask it to pick certain text AND certain text within a cell.
View 6 Replies
View Related
Sep 15, 2014
I am trying to make a UDF that searches for a header, grabs everything under the header, and pulls it somewhere else. My UDF has three parameters:
1) Output_Range: the named range where the parameters will be pulled to
2) Header: the header to search for in order to copy the data underneath it
3) WorkbookName: the name of the workbook to search in
It looks like this:
VB:
Function LoadParameters(Output_Range As Range, Header, WorkbookName As String)
MyTimer = Timer
'Defining the variables.
Dim HeaderCell, HeaderCellEnd, HeaderRange, Output_Range
[Code]....
View 3 Replies
View Related
Nov 5, 2008
I'm attempting to do a sumproduct with different dimensioned ranges. I've read multiple posts that say that all ranges in a sumproduct must have the same dimensions. I've tried different commands (index/match/lookup, etc) with no luck. Perhaps someone can come up with a solution for me....
View 7 Replies
View Related
Feb 1, 2014
I have set following ranges:
[Code] ....
I use above rngData1 as follows:
[Code] ....
How can I use all above ranges in For Each statement?
For example For Each rngRow In .Range(rngData1+rngData2+rngData3+rngData4).Rows
View 3 Replies
View Related
Feb 3, 2014
I'm trying to create a Formula where the User has to select 2 Ranges and then a calculation is done for each corresponding cell.
I thought about using arrays or ranges but I'm quite lost.
[Code] ....
My Second approach would be to use Arrays
[Code] .....
This is what I thought about so far but it does not work. I guess because I have to Idea how to tell VBA to use the Interestrates Range for each corresponding cell.
View 3 Replies
View Related
Mar 9, 2014
In sheet x the range("d2:d20") will change from time to time. I've created a button that should copy this range("d2:d20") to sheet called summary and there to the next empty column. So the variable lstcol (dim = long) is the last empty column in summary. I'm definitely not using properly the range method.
View 8 Replies
View Related
Aug 28, 2008
I have 2 ranges with values, and I want to use countif to see of there's a same value in each of these ranges.
View 9 Replies
View Related
Oct 18, 2008
I would like to perform a calculation with each cell in a range from 2 worksheets and place the result in a range on a third worksheet.
I thought I could use the For Each Cell in Range construct but I don't see how to reference the two ranges in a nested pair of For loops. I am sure there must be an simple/elegant way to do this.
View 7 Replies
View Related