Finding Data In 1 Worksheet And Replacing On Another
Feb 20, 2009
It might be a simple question but ive been trying for over a week now and i just cant do it (probably cos my knowledge of VB is useless )
What i need to do is:
I have 2 worksheets: worksheet 1 Articles and worksheet 2 New Prices.
Whats common on both worksheets is Reference Nš (In the case of worksheet 1 its column E and in worksheet 2 its B), what i need to do is replace the price corresponding to reference nš in worksheet 2 (In column E) with the price of the corresponding reference number in worksheet 1 (in column N).
Its a basic find and replace, but its a list of over 17.000 articles so the best way is VB, so i look through your lists and helps, but i just cant do it.
View 9 Replies
ADVERTISEMENT
Jun 14, 2014
I'm currently doing a project which requires me to find and replace a large number of values.
ie. Column A Row 1 = 80099, Column A Row 2 = 554441, Column A Row 3 = Z5478, CAR4 = B89877 etc...
I need to replace these numbers with meaningful values and I have a reference table to tell me what these codes mean ie. 80099 = apple juice, 554441 = orange puree, Z5478 = pumpkin soup, B89877 = banana smoothie. The reference table is in a separate excel spreadsheet and is tabulated in two columns ie. Column A = "the code", Column B = "the value".
There are like 1000+ codes I need to find and replace which I know is going to kill me if I did it manually. How do I find and replace all the values?
View 14 Replies
View Related
Jan 14, 2013
I have two pairs of columns, A B and E F.
Column A contains one numeric value in each row. Column B lists one person's name in each row.
Column E contains a distinct list of the names found in column B (no repeats), with one name in each row. Each row of column F contains one alpha ID that belongs to the adjacent name in column E.
I need to replace each name in column B with its respective alpha ID from column F, effectively pairing each numeric value in column A with an alpha ID from column F.
Have I stated my goal clearly enough? I could Find/Replace a few hundred times, but I thought there might be a better way using an Excel formula. I'm a beginner-intermediate user, and I clearly don't know enough about Excel to even ask about specific functions for this task.
View 1 Replies
View Related
Mar 1, 2007
I'm replacing a specific sheet on a workbook with another one, but I want the users to be able to browse to a file, replace the sheet with the new one and re-establish the links on the replaced sheet with the target workbook. This macro is running out of the workbook that supplies the replacement sheet. The idea is that the user opens this workbook, runs the macro, browses to the file they need to fix and hey presto! I'm doing something stupid with my variable name, I'm sure it's syntax but I don't know what I'm doing wrong. The code is posted below.
Sub Macro1()
Dim ToBeFixed
ToBeFixed = Application.GetOpenFilename
Workbooks.Open (ToBeFixed)
Sheets("!").Visible = True
Sheets("!").Select
ActiveWindow.SelectedSheets.Delete.....................
View 2 Replies
View Related
Mar 8, 2014
I have data in sheet 1 like below
Custid loc city
123 us newyork
124 uk wales
876 in mumbai
Sheet 2
custid newcustomerid
123 756
124 394
Outputsheet:
Custid loc city
756 us newyork
394 uk wales
876 in mumbai
So it will check sheet1 custid with sheet2 custid. If both matches it will replace custid with newcustid.if cust id not exists it will load sheet1 recprds as usual.
View 1 Replies
View Related
Feb 17, 2010
What it does is to activate the desired worksheet, and for 3 different choices replace what's there with what I want to be there. I put this together a while back, and it's working fine, but I'm sure it can be cleaned up a bit. Any help would be appreciated.
View 9 Replies
View Related
Mar 7, 2012
I have a monthly report with over 2,000 entries per column and it is dynamic (number changes monthly). I'm trying to replace individual department names with "department" but keep certain ones the same. For instance- A,B,C,D stay the same but E-Z need to be changed to "department". I first coded an If then macro but was unable to get it to loop and after researching looping realized that it may not be the best option especially with large datasets. Is an advanced filter macro the best option where I filter NOT A,B,C,D and then change the results to department?
View 9 Replies
View Related
Apr 14, 2009
We have a report with 2 different sheets. On sheet one there are 13,000 rows of data and columns A-H are filled with different data. column A is our item id and column G has a date that states when the item was sold last. Well, the date in column G is wrong for about 7800 rows and needs changed.
The second sheet in the file is the 7800 rows with just the item id in column A and the correct date in column B. We are looking for an easy way to replace the rows in the first sheet with the correct information from the rows in the second sheet without manually replacing it line by line.
I almost forgot to add in, that in both sheets, column A with the item ids are the same item ids on both those sheets. So column A on sheet one has 13000 rows and included in those 13000 are the 7800 item ids on sheet 2.
We tried using the VLookup function that is incorporated into excel but had absolutly no luck, mostly because we have never used this function before. Sheet one already has all the lines of sheet 2, its just that sheet one has the wrong dates for the item ids and sheet 2 has the correct dates. im trying to replace the dates on sheet one from the dates on sheet 2 matching on the item ids from both sheets......
View 2 Replies
View Related
May 2, 2007
need to add same data to every other existing cell in the column, but not replace the data already in it, but to add to it. I've tried to google the answer and look here, but I probably use bad search terms.
For example, I need to add "QW" after each of these lines:
data1432
data9292
data3933
data3939
so it would look like this:
data1432QW
data9292QW
data3933QW
data3939QW
I have a few thousand rows of data, so wouldn't rather not do it manually cell by cell by typing :-)
View 9 Replies
View Related
Feb 21, 2014
When i want delete all my data on my sheet 'Export Freshbooks' and replace it whit new data it says.Data lost.PNG
So i click on ok then... but when i do this all my Formulas Are gone....
My Formulas must stay no matter what.
Test Version - Copy.xlsm
View 5 Replies
View Related
May 21, 2009
I have two sheets - sheet1 and sheet2. Everytime i run a macro in the sheet1and manually copy the rows from sheet1 {starting (A2:AI2)} and paste as values it in the sheet2 {starting (A2:AI2)}.
Then I ll delete the available datas in the sheet1 and will run a macro for different customer.
Again I need to repeat the same action (manually copy and paste the datas to sheet2) without replacing the existing data in the sheet1.
In simple I require a macro code where it copy the available information in sheet1 and paste it as values in the sheet2 without replacing the existing one.
View 14 Replies
View Related
Jan 10, 2014
Basically I've got a back end worksheet with a huge table full of data (hundreds of rows, tens of columns) containing the data for a load of different contracts (each contract is on a different row).
I have all the information I want displayed on a front sheet by means of very simple lookups which looks for one contract at a time to display that information. What I would like to do is to be able to alter that information on the front sheet which will then go back and lookup that entry in the big table and overwrite the old data with the new. Effectively I want the excel sheet to act as a user form, but without actually using a form (a requirement from the people I'm doing this for). I'm struggling to find out how to do this as I don't know which VB functions I would need to use.
Each contract has its own unique reference number, so really what I need is some sort of code that will look for that reference number in the back end table, then look for any differences between what's on the front sheet and on the back end, and then replace anything that's changed.
View 4 Replies
View Related
Dec 21, 2012
VB:
GetData FName(N), "Worksheet1", "H10:H10", destrangeName, False, False
is there a code i can use to choose the 1st worksheet insteading of selecting the worksheet1 in workbook? Because there are different file that got different worksheet name. E.G. worksheet1, worksheet2 or maybe Addidas, Nike.
View 3 Replies
View Related
Jul 29, 2013
I have three work sheets.
Worksheet A contains the Names that I want to find in Worksheet B and C. Trouble is, the format of the names are different in each Worksheet.
For example:
Worksheet A, Column 'Name':
Kyle Rowlie
Worksheet B, Column 'Name':
Kyle Rowlie, Head of Excel
Worksheet A, Column 'Name':
Rowlie, Kyle
What I need to do is create two columns in Worksheet A that identifies Kyle Rowlie is duplicated in Worksheet B and C.
View 5 Replies
View Related
Feb 9, 2012
I have a number of spreedsheets that may have a 1000 worksheets. Is there a way to find a particular worksheet using a search by the name?
View 9 Replies
View Related
Feb 14, 2014
I have my training file that is currently set up and working how I want it to, however I would like to go one step further if it's possible.
on the FIRE EXTINGUISHER TRAINING column there is one person out of date and 14 people that need the training, how can I populate all the name that need this training onto sheet 1 into the box that I have created. I'm wanting this to happen automatically so I don't have to retype the name onto this sheet.
View 14 Replies
View Related
Sep 27, 2009
Is there a simple way using VBA to find a date in the format of dd/mm/yyyy? I have a range on every sheet from A1 to IQ1 with dates already entered. I want to add this vba to some other code so the user can go straight to the date entered on the worksheet.
Using the edit find, it can find dates easily. Can this function be replicated through VBA?
View 9 Replies
View Related
Mar 31, 2007
I found a topic here that wanted to know how to remove links, I wanted the same thing.
I found an add-in that identified and could remove any links in the workbook depending on the response to the dialog box. So far, so good.
But it found a link that was located on another page, this link was linked to a third workbook. But what the link is doing or what its association is w/ the other workbook is a mystery. How do I see what this link's purpose/function is?
View 9 Replies
View Related
Mar 25, 2014
I've defined a string array and would want to use it as a basis for a vlookup. Is it possible to find the elements of the array directly in the worksheet ?So far I've got :
[Code] .....
View 2 Replies
View Related
Mar 6, 2012
I have created a worksheet that uses lookup for the numbers that are in sequence but am unsure what formula to use when trying to lookup non sequence numbers as shown below.
Sequence No's
Cell A1:A10 would be 1,2,3,4,5,6,7,8,9,10 (as example)
Non sequence No's
Cell B1:B10 would be 2,5,1,7,3,8,4,10,6,9 (as example)
What do I use to lookup, if cell C1 = 1 and needs to find the No 3 from the Non sequence cells?
View 5 Replies
View Related
Aug 9, 2012
in finding duplication within different worksheet tables using excel VBA.
Sheet 1 has the following table below:
A
B
C
D
E
F
G
[Code]..
The format of both tables is different within both of the sheets.
The desired output should be shown in sheet 2 table:
A
B
C
D
E
F
G
[Code]..
The above table (sheet 2) shows duplicate rows (bold) from comparing table in sheet 1.
I was using this function below, however this does not give me the desired output i am looking for.
=IF(AND($F2=Sheet1!$F2,$H2=Sheet1!$H2,$E2=Sheet1!$E2,$G2=Sheet1!$G2),Sheet1!I1,"").
View 7 Replies
View Related
Sep 10, 2006
I cannot figure the formula for finding an intersection of two points on a seperate worksheet. I have attached the workbook.
View 6 Replies
View Related
Dec 11, 2007
I am writing a macro to track stats in a workbook. The workbook has the check every tab in the given workbook, hidden and unhidden. In order to track the stats I find a column labeled "Read Dates" on each worksheet. The "Read Dates" column is not always in the same location so I have the macro Find the words "Read Dates". To make sure the cell the macro finds is the column label and not just another cell where someone may have used the words "Read Dates", I have an 'If/Then' statement checking the column to the left to ensure "Rev Mo" is there. If the state is true, the macro begins tracking stats. If the statement is false it attempts to find the next cell containing "Read Dates".
My problem occurs when the macro selects a sheet that contains no data or does not have the words "Read Dates". To help remedy this, I have an Errhandler that simply tells the macro to move onto the next worksheet. My problem is that there are several worksheets that do not have a cell with the value of "Read Date" so the second time the ErrHandler errors. Below is the section of the code I currently have an issue with.
Sub Begin_tracking()
'Error Handler
On Error Goto ErrHandler
WCount = Worksheets.Count
For i = 1 To WCount
If Worksheets(WCount - i + 1).Visible Then
Worksheets(WCount - i + 1).Select
Can anyone think of a better way of doing this so the entire workbook is worked or tell me how I can reset the Error Handler is it will move onto the next worksheet? I've looked into help on this forum to rest the ErrHandler but what I've found and tried has not worked. The ErrHandler may be invoked 2 times or it may be invoked 20 times depending on the workbook.
View 8 Replies
View Related
Jul 13, 2013
I am working on large sets of data (more than 50,000 rows of data). I have two sets of data. Set 1 and Set 2 (master data) on the same worksheet. Both the sets of data have three columns each. I am using EXCEL 2007. I was able to accomplish step 1 below.. but I am totally lost with step 2 since i have an additional criteria for the "year".
I have attached the excel sheet as well. This is what I am trying to accomplish:
1) I want to find exact matches in set 1 and set 2 and highlight it or do something to show that a match was found. The challenge is the data in set 1 can occur anywhere in set 2.
2) Add to the complication .. my criteria for matching the year is different. If the Set 1 "year" is equal to or greater by 1 yr or greater by 2 yr when compared to Set 2 "year", I want to treat it as a "match".
For example, from the data attached:
Set 1 data in row 4 is: ATLANTIC ABSECON 2004
Set 2 data in row 3 is: ATLANTIC ABSECON 2003
I want to treat these two data as "MATCH" since ATLANTIC matches ATLANTIC, ABSECON matches ABSECON and according to one of my criteria for year, Set 1 "year" is greater by 1 yr than the Set 2 "year".
View 1 Replies
View Related
Sep 11, 2008
How would i write VB code that looks for the last row in my data table? I'm a total novice with VB but learning slowly..
View 9 Replies
View Related
Feb 17, 2009
On my example sheet it shows how many cables and how the cable length per job. What i need is for the hour/job column to be populated from the Hours sheet by matching the column and row. e.g 4 cables at 40 metres would give me cell D7 (27.89), as 25 metres would be no good - so rounding up would be required.
View 2 Replies
View Related
Mar 3, 2009
assist me with editing this code so that even though my range may be set from A1:A3000 it would stop after finding and completing its task in the last cell in column A with data. This code will put dashes in a set of numbers and there is no certain amount of account numbers that could end up being in column A on any given month.
View 3 Replies
View Related
Jun 25, 2009
I have a range that changes the data constantly, I have to watch that data changing. I am trying to work on a macro that copy that data and paste to another sheet. What would be the code to find the next empty row and paste my data there.
Data is in Sheet1, range A17:E32... and it needs to be pasted in sheet2 starting in F2.
View 4 Replies
View Related
Nov 9, 2008
My spreadsheet consists of two columns, column A holds a series of numbers whilst column B, again holds a series of numbers but with an added single letter on the end.
What I would like to do is find a function which will match the numbers and letter in column B with the corresponding numbers in column A and then place the result in column C ....
View 10 Replies
View Related
Oct 10, 2011
I have to detect all staff members with the passport expiration dates between two given dates, i.e.
A 12/4/2012
B 5/3/2012
C 7/3/2012
D 6/3/2012
E 9/12/2012
F 12/11/2012
G 11/16/2012
H 10/12/2012
etc
So, I need to have excel detect all staff members with the expiration dates between let's say 9/1/2012 and 12/31/2012.
View 3 Replies
View Related