Retrieve Similar Value From Another Sheet?
Nov 28, 2013
I have an excel grid which have 2 sheets, sheet2 have all the data, I am doing a macro which based on a value that I put in sheet1 is supposed to find Items which have similar value +/-3 from sheet1. I made a code which I posted below, I don't have any error message but it doesn't work as it should. I explain you with an example: If in the data grid I have the following values
11.8
67.0
25.5
18.1
13.0
if the value I look for is 12 +/-3, it doesn't find anything.
if the value I look for is 11 +/-3, it finds 11.8 but not 13,
if the value I look for is 20 +/-3, it finds 18.1,
if the value I look for is 23 +/-3, it finds 25.5,
Here is my code:
Sheet1.Cells(1, 3).Select
Dim Amin As String, Amax As String ', Bmin As String, Bmax As String
Amin = Sheet1.Cells(3, 2).Value - 3
[Code].....
View 2 Replies
ADVERTISEMENT
Apr 5, 2009
Clients come to the shop and can ask to receive body massage, foot massage or herbs massage for 1 hour, 2 hours or more. Prices vary depending on the number of hours requested by client and option (body massage, foot massage or herbs massage). For example, one hour is more expensive than if they get two hours at once.
At the moment, our secretary has to keep records of who's massaging, what option and number of hours. From that she has to calculate how much each employee must get at the end of the day. Hence, I want to create a document to automate all this by letting her select from drop down menus the name of employee, time massage started, number of hours and the option (body massage, foot massage or herbs massage). It contains two sheets:
SHEET 1: management: see atached image: management.jpg
SHEET 2: rates: see atached image: rates.jpg (prices are not real).
In SHEET 1: Management
TOTAL in column H is what we charge customer.
TOTAL EMPLOYEE in column I is what must be paid to the employee after each massage.
TOTAL in column A and B is total price at the end of the day.
In SHEET 2: rates
There's 3 options: body massage, Foot massage, Herbs massage. For each options, there are two columns: first column is the price for client and second column is price to pay for employee.......
View 5 Replies
View Related
Apr 29, 2006
I use macros, where in DialogSheet EditBox i entered new sheet name and add it.
How to find, exist this new sheet name or not in this workbook?
View 9 Replies
View Related
Jul 1, 2008
I need a formula that'll retrieve the sheet name in order to use with lookup function ...
View 11 Replies
View Related
Jun 29, 2009
I have two sheets, one is "Summary" sheet and the other is "Sheet1". Both sheets has the same template. The "Summary" has color bordered cells and the "Sheet1" has no color. Whenever new color had been added to "Summary" sheet, I would like color from "Summary" sheet to be copied to "Sheet1" in same locations like if red been added to D12 cell in "Summary" sheet, D12 in "Sheet1" will automatically filled in red from "Summary" sheet. Similar to Lookup.
View 3 Replies
View Related
Apr 13, 2012
I have two work sheets as-
Sheet1
idnameclassscores
1abc280
2efg276
3hij555
8klm478
9mno490
Sheet 2
nameschooldate of admission
abcpublic school2/9/2011
efgpublic school3/4/2010
hijprivate school5/9/2011
klmprivate school8/9/2011
mnoprivate school9/10/2011
now what i want is - on sheet 3 compiled data as-
idnameclassscoresschooldate of formation
View 1 Replies
View Related
Jun 26, 2012
I am using ADO to retrieve data from sheet 1 and 2 into sheet 3, within the same workbook.
The following code does the job correctly.
However, when I have two such workbooks open, say workbook 1 and 2 and run the code separately to retrieve data into sheet 3 of workbook 1 (from sheets 1 and 2 of workbook 1) and retrieve data into sheet 3 of workbook 2 (from sheets 1 and 2 of workbook 2), I get a runtime error message.
I suspect it might have something to do with locking: rs.LockType = adLockOptimistic
Sub Get_Data
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
[Code]....
View 5 Replies
View Related
Dec 10, 2013
What I would like to do is use the IF function to retrieve data from another sheet called Data which has six columns but has various amounts of data that I would also like to pick as a drop-down menu.
The initial cell has a dropdown populated with data using the Data Validation.
Example would be if the following is selected from the initial drop-down menu and then allows me to select data depending on the previous selection.
PX1 - fetch information from Data T2 to T25 and then select that data which then would allow me to select data again from say column U2 to U9.
Is this possible?
View 5 Replies
View Related
Jan 15, 2013
Excel macro to retrieve some valid data from one sheet to another which has some values.
Description;- I have made an excel sheet for daily stock details which contains data like stock in, out, daily production for various products. I have made a menu which contains button of stock in, out and production, and one sheet for current stock where I enter In and out. I wand a macro when I click the button from the main menu it gives me all the production details taking from one sheet and past it in different sheet in the same workbook but it should not give the details of those products which does not have and production.
View 1 Replies
View Related
Aug 5, 2014
I'm trying to build an Index-Match formula to retrieve a number from a "data" sheet onto a "summary" sheet.
In example spreadsheet, I need to retrieve the stock price on a specific row from "data" sheet, and as an alternative, the most recent price.
View 6 Replies
View Related
Jan 23, 2010
i have multiple worksheets which has data (similar to sheet "Homewares") which need to be summarised in the summary sheet, i need macro that will grap all the info from all worksheets and pull data into sheet summary. The headings in data sheets will always be in Col A, i need to populate the summary sheet with this data please see below example
Homewares
AB1 2 3CompanyHomewares Limited4 5Register NameInvestment Services Pty Ltd6 7CodePCABO1 8 9Sec TypeFPO10 11Option Expiry Date 12 13Total Holdings5,947,500.00
Excel tables to the web >> [url]
Macro to return result as per below screenshot
Summary
ABCDEFG1 2 3 4 5 6CompanyRegister NameCodeSec TypeOption Expiry DateTotal Holdings 7Homewares LimitedInvestment Services Pty LtdPCABO1 FPO 5,947,500.00 8 9 10 11
Excel tables to the web >> [url]
View 9 Replies
View Related
Mar 3, 2014
I have created a userform with multipage, has two page that add new record in a excel sheet. Data has a unique reference no.(TxtRef.Value) for each record. I am trying to add a button to load the added data for a specific record using reference no back to userform so that it can be updated and overwrite back to the sheet in the same row, So far it is adding new record correctly. I do not know how to populate all the fields of the of an existing record and overwrite it back to the same row instead of adding a new record. Below is my codes
[Code].....
View 1 Replies
View Related
Nov 18, 2007
I want to have a sample file in excel which store picture of student in comment, I did this, but when I want to insert picture the file dialog appears, and if I click cancel, then there is an error, why? If some one optimise the code it would be very nice
View 6 Replies
View Related
Feb 21, 2008
As you can see in the example below, in column B I have a list of vendor names, some of which are similar but not identical. (For Example, in one instance a vendor will be called "Ford Motor Co.", while in another it will be called "Ford Motor Inc.".
I need to populate column C, which at every instance where two plants (listed in column A) have similar vendor names in Column B, a universal name will be assigned and recorded in column C for each of the similar names.
HOpefully it is clear as shown below.......
As you can see in the example below, in column B I have a list of vendor names, some of which are similar but not identical. (For Example, in one instance a vendor will be called "Ford Motor Co.", while in another it will be called "Ford Motor Inc.".
I need to populate column C, which at every instance where two plants (listed in column A) have similar vendor names in Column B, a universal name will be assigned and recorded in column C for each of the similar names.
HOpefully it is clear as shown below.......
View 9 Replies
View Related
Apr 10, 2009
I have created a sheet that contains a new diet program, calculated down to the precise calorie required for my training routine. Please see below for an example of one of my daily meals:
[url]
I need a formula that will help me to create a weekly shopping list (as the values in the example above will change on a regular basis). So I need to take all values from the from columns A & B, multiply them by 5 and then show me the totals in another sheet.
Similarly, I need to do the same with columns E & F, only they need to be multiplied by 2. The totals then need to be added to give me the required amount (in grams) for the week.
View 11 Replies
View Related
Feb 18, 2010
=ISNUMBER(MATCH(X1,A:A,0)) where X1 is cell you are checking for a match to check and see if there are duplicates in 2 rows. Is there anyway to check to see if a cell contains a string of numbers. Example: Cell A1 has 0000402502LK and Cell A2 has 402502. Is there anyway to get this to show up as true since the 402502 in contained in the string in A1?
View 2 Replies
View Related
Jan 29, 2014
I want to delete rows that are a subset of any other row. Not manually, as there are thousands of rows. For example, in the attached file, row 4 is a subset of row 5 (also row 12 of row 13, row 14 of row 15, and both rows 21 and 22 of row 23).
View 2 Replies
View Related
Jan 23, 2013
I have a large spreadsheet where some data are similar. for Example
Robert $1000
Louis $600
Glen $350
Doreen $2300
Robert $500
Louis $600
Glen $750
Doreen $300
Robert $3000
I want to merge all Robert together, all Louis together and show as one Robert $4500. How can I do that ? Should I use a Look up.
View 11 Replies
View Related
Jun 8, 2009
I have the following seven codes used to fill a ListBox with data retrieved form a range (DACNRange).. they are almost the same .. the only difference between them is the range column number (highlighted with red). Instead of these seven similar codes, Can we create a general code replaces them all?
View 2 Replies
View Related
Dec 8, 2008
I need to return the text from a string, in a similar way to they way LEFT/ RIGHT would do.
I have some text in a cell, say A1 that looks like this ->
TEXT BEGIN --- TEXT NOW ENDS
I want to return everything before / after the --- symbols.
View 4 Replies
View Related
Jan 11, 2012
How to combine cells with a similar value inside them into a single cell. Here is what my data looks like.
10'X14'{&}SNM8981-1014{&}16
2'6"X10'{&}SNM8981-2610{&}9
4'X6'{&}SNM8981-46{&}6
[Code]....
For example, I need to have every cell with SNM9012 to combine into the same cell. If I could figure this out it would save me hours vs pasting the similar lines into textmate and removing the enters.
View 1 Replies
View Related
Oct 22, 2013
When you filter a spreadsheet, you can find results that are similar to a condition. I have families of products that share a common 3 digits, but the rest of the model number is different. The 3 similar digits could be the first 3 digits, or it could be 3 digits starting with the 2nd digit. This spreadsheet has each complete model number on its own row. In that row is a number that represents a volume. I want to be able to sum the volume column if the model number contains the 3 digits.Model Number
Volume
A hat
5
B hat
1
A glove
4
hat
8
In the above example, the total for "hat" = 5 + 1 + 8 = 14
I would type in a condition (family name) into another cell (D1) and the formula in D2.
View 8 Replies
View Related
Mar 6, 2014
Problem is Findstring finds cells that contain "SS1" AND "SS1 EXT". These are separate grades.
I need Findstring to only find SS1. Using xlWhole doesn't work for me, as the cells also contain other data. For example: " SS1 48 /"
CODE:
FindString = "SS1"
Findstring1 = "SS1 EXT"
With Sheets("Sheet1").Range(Rng4)
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
[Code] ........
View 1 Replies
View Related
May 2, 2014
Cell A1 = 78-36
This is a win/loss ratio so to have it as a percentage I would have to divide the first number by the sum of the two numbers so 78/114 = 68.4% How would you do this with a formula?
I came up with this that isn't quite right, because RIGHT and FIND don't work together.
=LEFT(A1,FIND("-",A1,1)-1)/(LEFT(A1,FIND("-",A1,1)-1)+RIGHT(A1,FIND("-",A1,1)-1))
There must be a smarter way of doing this. TY
View 8 Replies
View Related
Jan 3, 2007
This is probably a simple question, but one I can't figure out after several hours. I am creating a spreadsheet focused on certifications.
I need to take the date each initial certification was achieved, and add x years to each cert, which is simple enough.
The sticky part is that the (date + x years) can't logically be a weekend; if it is, I need to subtract one or two days from the result, so that it's the *weekday* immediately prior.
e.g. if my initial certification date is: 1/23/2006 and my certifcation expires in four 4 years:
A47= date(2006,1,23)
h47= 10
=DATE(YEAR(A47)+H47,MONTH(A47),DAY(A47))
Result = Saturday, January 23, 2010
If the result is a Saturday or Sunday, I need to subtract one or two days from the date. In this example, I'd like: Friday, January 22, 2010 as the result.
I've been playing with 'if', et. al., to no avail.
View 9 Replies
View Related
Feb 28, 2007
I am after a control similar to the Properties one in the VBE. The one where you modify properties for a control in design mode.
Does anybody know of a suitable Control that I can use in my project that has similar usage?
View 9 Replies
View Related
Apr 17, 2007
I have a spreadsheet that has descrptions in column D. Where the descriptions are the same ,
I need the VBA code that will do the following:
1) Sort the data by columns C (descending), G (ascending) & E (ascending)
2) Putting a border around all the data where the decriptions are the same
i.e from column A to Column I beginning from row 2
I have attached a sample file for ease of reference....
View 9 Replies
View Related
Sep 16, 2008
I use these and related functions (Format, Right$ etc) in my VBA code. Works perfectly on my machine, butwhen a colleague opens the sheet I get repeated compile errors - "Can't find project or library". I have checked all the references and tey are all there, so much scratching of head.
View 9 Replies
View Related
May 4, 2009
I'm trying to create a formula that would check if there are similar values in a row. How should I do this? There are 20 values in a row, and they should all be different (true). If similar values are found, it should give a warning or highlight the two or more cells.
View 9 Replies
View Related
Jan 17, 2007
Daily We have to search the similar numbers in a enormous database (around 35000 - 45000). Base will vary daily.
The Numbers in 2nd Row of 'wish sheet' has to be compared with 'base sheet' (B,G & L columns in Base sheeet) and the similar numbers has to be copied down from corresponding 3rd row. single character variants and double charcter varients need to be found. box is made to differentiate single and double variants. The test file may be useful to identify my problem.
It is very difficult to use find Numbers manualy. We have been helped by the experts on various circumstances in the past. So, We again seeking help from our senior brothers here.
View 9 Replies
View Related