Search Column Then Update Alternate Sheet With Offset
Jun 20, 2007
Here's another question for you excel junkies to solve, while I try to understand what y'all are doing. I have two worksheets named "MASTER" and "BEDS". What I need to do, in sheet "MASTER" is go down column ("K:K"). "K:K" has unique data in it. then for each row...
"X" .value = offset minus one
"Y".value = no offset
now I need to go to sheet "BEDS" and find "Y" in column "A:A" then
from "Y" offset + 3.value = "TRUE"
"Y" offset +4.value = "X"
there should only be one instance of "Y" in column "A:A"..............
View 3 Replies
ADVERTISEMENT
May 14, 2014
What I have is a sheet that is copied periodically from some source sheet, and on this sheet is a table. This sheet is called "Onsite Checklist Template" and it's table is titled "Checklist". I also have another sheet called "Loggers and Initial Notes" which has a tabled titled "Record", and then finally a title sheet call "Proj Details".
To clear this intro up - The sheets, in their order, is: "Proj Details", "Loggers and Initial Notes", "Onsite Checklist Template". The tables: "Record" on "Loggers..." and "Checklist" on "Onsite..."
When the user wants to make a new site visit, he/she fills in the requested date and then selects a button on "Proj...". When this button is selected, it copies the table data on "Record" and puts it on "Checklist", then inserts a new worksheet tab, always in the 3rd position (the title is based on the site visit date in which the user entered), which is a copy of "Onsite...". Now we have another sheet with a table called "Checklist1", and upon another new site visit, there will be another worksheet with "Checklist2", and so on.
On the "Onsite..." worksheet, there is a button on it which also gets copied with the worksheet so that every new worksheet has this copied "Checklist ???" and this button. I'm looking for a macro that, when the button is selected, will bounce the active sheet's table "Checklist ???" off of "Record" and make changes as needed.
"Checklist ???" data range is B11:M20 (the header is on row 10); "Record" data range is B29:Q78 (the header is on row 28); Column headers are titled the same, just that "Record" has 4 extra columns, 3 in the middle and 1 on the end. "Checklist ???" columns 1-12 to "Record" columns 1-7, 10-12, 14-15. The search criteria is the 4th column in both tables ("Trk #").
I need the macro to do the following:If it finds a match, then update "Record" as needed with data from "Checklist ???", changing whatever cell is different in the row that contains the matching "Trk #", so long as the cell on "Checklist ???" is populated (i.e, if a cell on the target row of "Record" has a value, but it's blank on "Checklist ???", then "Record" wins; if it's blank on "Record", but populated on "Checklist ???", the Checklist wins. If both populated but different, then Checklist wins.If a "Trk #" exists on "Checklist ???" but is not on "Record" then add the line to "Record" (the 1st empty row, table size remains)I see no need for any "delete" at this time.
My concerns: The last column on record (column #16) is the filtering column for the worksheet copy event and needs to be left alone (it's formulated to produce a "Yes" or "No")I would like the ability to adjust table sizes if needed without modifying the macroThe table rows on "Checklist ???" will not be changed, deleted, or altered in any way by the macro.
View 2 Replies
View Related
Mar 22, 2013
I am trying to work out how to nest offset in a code using search replace. The goal is to find a value from cell A1 (example) and replace the values in the cells next to the cell containing samuel and the cell containing samuel.
A sort of search and remove data tool if you like So for example:
[QUOTE]A1: "samuel" (the search criteria)
Search range is: B1:D400
(for example)
Cell B40 = samuel
C40 = Driver
D40 = year
So, the macro is activated and finds "samuel" in B40 and I would like C40 & D40 replaced with "" The code I'm using is below: (this is just replacing the cell containing the search criteria with "test". I would like to nest offset(0,2) & offset(0,3).Value = ""
Sub Macro1()
Range("B1:D400").Select
Selection.Replace What:=Sheets("Sheet1").Range("A1").Value, Replacement:="test", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
View 2 Replies
View Related
Nov 19, 2006
I have created some code to look in a cell to see if the name matches that which has been input in a drop down list on a combo box on an input form and then copy the value of column 10 in the same row. I created a public variable for that name as txtTenant.
What I wanted to do was to then write the code that if the first cell did not match the name selected (txtTenant) that it would then drop down one cell and compare it and keep going down until it finds a match, right down to the end of the column of data if necessary.
My coding is not working - it stays at the first person it finds in the first cell. I am not sure if I should be using For...next loops or loop.....
This is the
Sub FillData()
Application. ScreenUpdating = False
RentRow = 2 'sets the first row as row 2 in the data sheet to copy from
NewRentRow = 7 'seta the row to copy to in txtTenant
View 9 Replies
View Related
Apr 10, 2009
I need to make a list of items that occur above the string "Room" and the data offset to the bottom and bottom right.
Here is the sample data:
1, 100A
2, Room, Rh
3, 123, 11
3, 200B
4, Room, Rh
5, 456, 24
6, 300C
7, Room, Rh
8, 789, 56
...
On another sheet this is what the output should look like:
1 100A 123 11
2 200B 456 24
3 300C 789 56
...
Here is a copied function that I've been trying to work with. "ROOM_AREAS" is the range in column A. I just can't seem to figure out how the ROW and SMALL functions are supposed to work here.
View 12 Replies
View Related
Jan 19, 2014
Trying to grasp the concept of using these 3 functions to search for and return values from a data sheet.
The attached spread sheet has performance data for a group of employees.
What I need to do is find a particular employee then return a value for one of the category's.
For instance, I need to find "10TE03 ANGIE HOLLIS" Parts Usage on color or cell C10 in the attached sample.
Sometimes new category's are added to column A adding to the number of rows so a simple offset is not reliable.
Once I get that working, I then need to use a named range to total and average different data points for groups of employees by teams.
Maybe Offset-Index-Match is not even the way to go here?
View 7 Replies
View Related
May 14, 2013
I have a sheet1 with following column name Ab,Bb,Cb,Db,Eb,Fb and sheet two contains Ab,Xc,Eb,Sv,Db,Fb,Gm,Cb,Hb these headings are on 7 line of both excel sheet.
Now I want to check each cell under column name Ab in Sheet1 and compare it with all the cells under column name Ab in Sheet2. If both matches then update Cb,Db,Eb,Fb of Sheet1 to the corresponding columns in sheet2 for that column name.
View 1 Replies
View Related
Jul 22, 2007
Attached is a workbook that I am having a major problem with. Basically it is a stock management system for a hotel allowing purchase orders to be easily generated and receipted.
The purchase side is working as I want it to - so no problems there.
On the receipting side, however, I am having a lot of trouble. Here's what I want it to do.
For each item shown on the Receipt sheet that has a quantity in the received column, I want the code to find the appropriate line in the StockTotals sheet (using the UID which appears in column A of both sheets), then offset the appropriate number of columns, and update the numbers as follows;
Stock on hand grows by the number receipted.
Number on order drops by the number receipted.
If the number on order is now zero, then I want to clear the ordered cell as well as the ordered date cell next to it.
View 9 Replies
View Related
Jan 14, 2013
I've got 3 problems I've been trying to solve for the last 7 hours, I think they are all relatively simple to those who know what they are doing but I've exhausted my excel for dummies and every formula I have taken from this siteand tried to adapt. Obviously I'll post each problem on a different post, so here's problem one. The sample is attached. It will consist of about 35 sheets, each documenting the hire of a Motability scooter or wheelchair.
On each sheet column P will identify any review dates. What I would like is: On the Master page in Column C next to the relevant sheet name is for it to display any 'Review' that is flagged up, so that the user can have an overview. There will only ever be one 'Review' per sheet, I can only get the master page to show it by referencing it to one cell, I can't work out how to search the whole column.
View 4 Replies
View Related
Jan 28, 2014
I've got a big file with a large dataset. One of the sheets works as a screening for the data, so everytime I populate an ID number in say cell C3, the rest of the sheet updates as per the formulas I have in place. However, I need to write a code that takes ID numbers one by one from a sheet, populates them into my screening sheet, updates the sheet and saves it.
View 4 Replies
View Related
May 31, 2014
I am having some difficulties using a combination of IF and the OFFSET function to display a range of cell values from another column based on a simple condition. The values I need to display at the destination cells should be offset by 8 columns to the right and "X" rows down from the reference column. The value "X" is to be determined via the IF function to check for the row index number.
For example, if Index value "X" = 8, then display the value of B2 in cell I9. IF X = "9", display B2 in cell I10 etc.
I have attached a sample worksheet that provides some examples.
View 3 Replies
View Related
Nov 29, 2013
I have a single column of data and need to convert it into 2 columns, by alternating each row:
1
2
3
4
5
want to convert to:
1
2
3
4
5
6
I've seen a previous post from 2007 where someone asked for a formula to do the reverse of this. 'Domenic' provided a formula =INDEX($A$2:$B$6,INT((ROWS(D$2:D2)-1)/2)+1,MOD(ROWS(D$2:D2)-1,2)+1) which converted
a
1
b
2
c
3
d
4
[code]....
how to reverse this formula?
View 1 Replies
View Related
Apr 16, 2013
Is there any possibility to protect alternate cells of column see below for example. I want to lock cells B1, B6, B11 and B16 only so that no one is able to delete the average rate.
A B
average rate0.0
1
1
1
1
average rate0.0
1
1
1
1
average rate0.0
1
1
1
1
average rate0.0
1
1
1
1
View 3 Replies
View Related
Mar 2, 2014
I have two charts (Chart A and B) and 1 duplicate chart of chart A ("Chart A", didnt change the change name so remain the same).
"Chart A" is overlay above Chart B to see the actual different.
When the data is updated, interval-Y in "Chart A" is different (by +-10% offset) than Chart A which support to be the same.
At this stage, comparison is not possible.
The interval-Y is link to vb.
Checked when there is offset the maximum and minimum offset is different and else I cant find any other problem.
Do I have to state that there are two Chart A in the vb?
View 1 Replies
View Related
Aug 11, 2009
I have been working on a spreadsheet with 3 sheets and have done everything except the last function which I just can't work out.
Data is entered on the first sheet in a list with an item number, description, dates etc and then finally, if they are a certain type of item, a variation, a 'variation number' in a column.
The next sheet is then called 'variations' and here starts my problem. I want to have a formula that picks up if a variation number has been entered on sheet one in the 'variation number' column and if so, add that item into this sheet, in order.
So to summarise, I need sheet 2 to search on sheet 1 in a specific column for numbers 1-30(ish) for a series of items.
I then need sheet 2 to list each of these in order, copying over each item that goes with the number from sheet 1 in the same format.
View 12 Replies
View Related
Jun 14, 2007
I am trying to resolve a calculation issue where I want to sum accross columns depending on an entry in the column immediately preceeding. The layout is an Attendance sheet, The columns are for the days of the Month ( 1 - 31 ) and the rows are the Months. There are 2 columns associated with Each day. The first column is for the type of Time Off ( Vacation, Sick, Personal, etc ) the column next to it records the number of Hours some one took off. The work book has a Sheet for Each Employee and a running total needs to be maintained for the amount of "off time" each employee takes by the various time off categories. I have tried setting up range names but this won't work as there will be multiple sheets. I believe the problem is the mixture of Text and Numeric data but could not resolve.
View 3 Replies
View Related
Jun 4, 2008
way I can search a particular column, and when results are found, copy the rows where the results are to a new worksheet? And perhaps reuse the same worksheet (so clear the sheet on every execution)
I have tried auto and advanced filter but its not really working to my liking....
View 6 Replies
View Related
Oct 27, 2008
I have a price list from a friend. The price list has to have every other row shaded. This part is no problem with the conditional format command.
The real trick, at least to me, is the background shade of the row is based on the first two letters in the left most column.
For instance:
Column A
CPST4
CPST5
FLADS3EC
FLADS2EC
FIL4
CP rows would alternate with one color while FL rows would alternate with a different color and FI rows would alternate with another different color. All other rows would have no shading.
MacOffice Excel 08 is used so no VB code can be used.
View 9 Replies
View Related
Jul 25, 2014
I have 2 worksheets, one called "Consolidated" and one called "Converted".
I have a spreadsheet where I press the update button and a macro runs that searches for the word "Converted" in column E on the Consolidated spreadsheet (the original). When it finds it, the entire row will be cut and pasted onto the "Converted" worksheet.
I have managed to do this with my current code. However when you press the update button again, all the newly pasted rows on the Converted worksheet are deleted. (I would like when i press the update button it to NOT affect the Converted worksheet, just add any new data found on the Consolidated sheet to the Converted sheet.) I assume this is because my current code her below is NOT telling the spreadsheet to paste to the NEXT AVAILABLE EMPTY ROW. Current code:
[Code].....
So the problem is this line:
[Code] .....
I have attempted to replace this line with:
[Code] .....
But there is something wrong as the code keeps breaking on that line!
View 5 Replies
View Related
Sep 15, 2007
I am attempting to change what cells this macro places into the report from each sheet and am having no luck. It now captures the “ Date”, Worksheet name”, “Address”, “Pwo”, “Part”, “Time” and “Comments” . I would like to replace the time field (the one after the “Part” and change it to “Quality Technician” so that each entry it finds with comments it will also list who’s comments they are instead of the time.
I have not been able to fix the missing headers or changing what it captures.
Private Sub CommandButton1_Click()
Dim wks As Worksheet
..........
Dim FirstCol As Long
Dim LastCol As Long
Dim iCol As Long
myDate = Application.InputBox(prompt:="enter date:", Type:=1)
If IsDate(myDate) Then
'keep going
Else
MsgBox "Please try again!"
Exit Sub
End If .........................
View 9 Replies
View Related
Sep 28, 2012
I'm trying to search a column to match the value in textbox1 then return to the userform the values from the same row in columns A to textbox2 and so forth.
I can get it to find the value but am struggling to get the data back to the userform
Reason for this is so the user can search an Id, get all the data back on the order before changing the Id number
The code im trying to use is
Code:
Private Sub CommandButton1_Click()
Dim lr As Long, i As Long
Dim x As Variant, y As String
Dim Found As Range
x = TextBox1.Value
y = UserForm2.TextBox2
[Code]....
View 1 Replies
View Related
Dec 5, 2011
I'm using a code to search some information in a pivot table and copy the value in the cells with offset(0,1) and is very very slow, I tryed another method with the using of Find but isn't working: error message: missing object in the with cycle.
Here is the working code:
Dim DataFine, DataInizio, UltimaRiga, Gg As Date
Dim NomeMacchina, Plant As String
Dim Cl As Object
Dim Pr As String
Application.ScreenUpdating = False
[Code] .......
Here is the code who doesn't work
For i = 6 To 500
Giorno = Sheets("OEE03").Cells(i, 2)
With Sheets("01")
Pr = Range("A5:A500").Find(Giorno).Offset(0, 1).Value
Sheets("OEE03").Cells(i, 9).Value = Pr
End With
Next
if I use this code on a normal sheet it works but when I try to use it on a Pivot table fields give me always the error message.
View 5 Replies
View Related
May 9, 2013
I have a userform for data entry. I am able to make codes for Add ( Add entry to database), clear ( Clear userform ) , Cancel (Exit userform). I have some more buttons and functions to be assigned to them but not able to write code .
Need codes for :
1) Have search box which searches Mat id in the complete database and returns value in the search result listbox. When we click on the result in listbox , the userform values are filled with the values that the mat id has . Then if user wishes he can update teh details for that mat id , and click on update button . the data is updated in the database. Or he can delete the entry from database by clicking on delete button.
2) Have arrows which will navigate through database ( need macros for that ) .
USERFORM.xlsm
View 5 Replies
View Related
Feb 17, 2010
Not sure if I am linking this correctly but here it goes...http://www.excelforum.com/excel-prog...ification.html
This is a previous post link that is now solved but I have a new question based on the code in the post. I would like to know how to add a search and update ability to the user form I have created. I am newb with user forms so I apologize in advance for my lack of knowledge.
And yes I know the way it is set up now it is depositing data in two different locations; this is for a specific purpose.
View 14 Replies
View Related
May 6, 2014
I have developed a functional User Form that works like a charm. The form will Add New Records to my database and Get Next and Get Previous records. This all works like a charm. I am stuck on how to search by Last Name or Employee Number and then to Update the Existing Record. If I change anything in an existing record as the VBA is written today, my only choice is to add a new record to the end of the database. I have added Command Buttons, but I'm lost as to how to write the code. Here's what I have so far:
VB:
Dim currentrow As Long
Private Sub cmdGetNext_Click()
Range("A2").Select
ActiveCell.End(xlDown).Select
lastrow = ActiveCell.Row
[Code]...
View 6 Replies
View Related
Mar 27, 2014
I came across a userform which was perfect for my needs, as I only had to create additional fields, which I did and have attached. However, since I have more than 10 fields, I was getting an error with respect to the listbox function, where it stated that the list property could not be found. I gathered from the searches I did, that this is the max limit for this particular function. I have been unsuccessful in finding a solution, partly because I don't know very much and I'm not understanding how to incorporate some of these solutions into the vba code. I've created simple userforms before, but this one is a little more advanced than my current capabilities.
View 2 Replies
View Related
Jan 26, 2010
it's a search loop which runs the following when the file is opened. I would put it in the workbook_open sub but instead I want to have the sheet update before a main userform appears.
What I need it to do is:
Read each cell in column K from row 6 onwards to the last active row.
If a value is found then store the value (let's say as variable x) and from that cell, add up each value starting in the cell that is two columns to the left (column I) and one row down, onwards going down until a cell = "" is reached in that column (contains nothing). The total values added in column I could be stored as variable y.
Once cell = "" is reached, have x - y to make z and then the total (z)should display in the cell to the very left of the very original cell that contained the value x.
Finally, if x = the value in the cell to the immediate left from where x is (so same row but in column J), have that whole row from column A to L turn green, else have it turn orange:
View 12 Replies
View Related
Dec 11, 2008
I have a basic formula =C17+'Asset Depreciation 2008 Onwards'!C24, and I want to copy it down just using the drag function. Problem is that the second reference range of cells are in rows and hence when I copy it down it doesn’t automatically update the cell references because it want to update them by column number instead of row number. IE I want it to display =C17+'Asset Depreciation 2008 Onwards'!
D24, instead of C25. Do you know if there is any way of telling Excel that I want it to increase the column number by 1 every time, instead of the row number for this part of the formula?
View 5 Replies
View Related
Aug 3, 2012
I have a requirement there is a excel sheet that has multiple sheet with application names , cntact names , phone numbers & email address and this gets updated by me often. I need a code that can put the application names and email address alone into an access database and that should automatically get updated whenever changes are made in the excel sheet.
View 1 Replies
View Related
Dec 29, 2007
I need a code for vinculating a user form and perform some searchings on a excel database.
For further details see attached file.
I created a user form in which some infromation is requested in order to search on excel database, I need a macro to search, display and update this data/information.
As an example, if i need to find the part number "C23138810-1" using the button search database and contains or match options, then displays all the information on the user form, this information is located in the same row where the part number is. Then, if some change is required, update is by clickig button "Update Data", and then if require "find next" item to review or update.
View 9 Replies
View Related