Macro To Find Correct Data In Cells That Have Multiple Values
Jan 27, 2014
Script Example.png (Picture)
Script Example.xlsx (Example Workbook)
I have a report that I pull that I pull fairly often that is in this format and shows which footage of products each store is getting (out of over 1800 stores)!
Above is the format that it comes back as. And here is a spreadsheet that shows what steps I take to find correct values in detail.
So each FTG has an ID# and Desc. The ID is in text format and each ID is seperated with a comma, no space. Description also. Date is seperate by a space and comma. Stores change footages a lot so I want to find out which footage is effective today (1/27/2014) For ex: Store 63 would have the 5ft effective right now because we are between 5/23/08 and 5/22/14. So each ID# and Ftg Description is in the same order as Date.
When I have hundreds of stores, it is difficult to go through and get each one (even with the way I've been doing it.) But my ultimate goal is to create a macro to put only the current footage ID#, Desc, and Date in Columns C,D,and E. I'm not sure even where to start with doing a macro.
I usually just find the store with most ftgs, count them, insert that many rows after ID and Description columns, then do a text to columns (comma, delimited), sort by 2nd date column (so they all come up top) and then manually go through them and delete unneeded columns once I have them all.
View 7 Replies
ADVERTISEMENT
Jan 15, 2009
I have attached a 97-2003 .xls file with data for multiple store locations on sheet 1, and the desired result on sheet 2. I am actually using excel 2007, but I dont think I need any special features that it provides.
I will try to explain the issue here without opening the attachment.
Here is an example of the Data on Sheet1
View 13 Replies
View Related
Jan 26, 2014
We receive about 20 sales files of several hundred lines of data each day from various agencies. I want to create a macro / VBA code which checks that the data submitted is correct so that we can upload it into our database without import errors and / or having to manually check each line of data.
I envisage something like an output report:
#####################
149 entries
Column A - Date - OK
Column B - Customer_Phone - Errors (Should be 11 digits)
Row 21 - Customer_Phone - Error (Not 11 digits)
Row 108 - Customer_Phone - Error (Contains letters)
Column C - Outcome - OK
Please correct and re-check.
#####################
View 4 Replies
View Related
Mar 13, 2014
So I have a list of organizations in Column A, with multiple names (anywhere from 0 to 50 names) for each org. in Column B.
Org
Names
Company A
Brown, Jones, Smith, West
[Code]...
I want to do a find and replace for all of Column B, where all the names are replaced with their respective color values. If possible, I'd like this to all happen with the individual cells (so for example, B3 might go from "Brown, Jones, Smith" to "Red, Red, Blue").
If that's not possible, I could divide all the names into individual cells and then find and replace.
View 3 Replies
View Related
Oct 19, 2006
I have a project that looks at a table of train schedules for a range of dates. The data is formated so that arrivals and departures are on the same row but differnent columns. The dates are to the right and the grid is completed with the number of arrivals for a paticular day. I have created a formula that looks at the data and returns the arrival time for that date. It worked fine until the schedule was altered so that the same train could arrive at 2 different times on 2 different dates. So train 976 arrives at 4a on some days and 5a on others. In the example Ihave posted train 976 has 2 passengers arriving at 5a but the formula shows 4a. Is there a way I can have the formula return the correct time based on the day of the month? I should point out that the same problem could exist for departures.
View 8 Replies
View Related
May 27, 2014
I have an excel workbook with 60 sheets (each contain data in the same categories and in the same column locations, just different information on each sheet). What would the VBA code look like if I wanted to manually enter the find and replace values and perform the function (find and replace) across multiple sheets in the workbook?
View 5 Replies
View Related
May 20, 2014
I'm working on a workbook that will track staffing patterns.
The workbook has three worksheets: Sheet1 "RCS", Sheet2 "HCT' and Sheet3 "Hidden". I've attached the workbook to this thread. The password for the form is "j".
On Sheet3 "Hidden" I have two tables that are set up to collect the SUM of columns on Sheets1 "RCS" and Sheet2 "HCT". I'm finding the SUM of each range by way of the background color. I've set up the following formulas and when the "data collection tables" are in the same worksheets as the original information, the formula's work perfectly:
The following functions are pulling data from Sheet1 "RCS" and placing them into a table in Sheet2 "Hidden"
[Code] ........
The following functions are pulling data from Sheet1 "RCS" and placing them into a table in Sheet2 "Hidden"
[Code] .......
I have two more functions that aren't working due to the fact that the source values are percentages and NOT plain numbers. The above functions work great for SUM but not for percentages. EXAMPLE--Let's say, 3 sub percentages it gives me the SUM of the 3 percentages (i.e. 85% + 100% + 100% = 285% instead of giving me 95%.
[Code] ........
How might I use the following functions to find the average of the source fields instead of the SUM?
View 7 Replies
View Related
Feb 15, 2010
I'm trying to create a formula that will added the correct amount in the correct cells, I have create a dunny sheet in trying to achieve this. If Cell B8:B11 = ABS or Dum that any points won should be added to Cell L8:L11 right now its adding it into K8:K11. If Cell B8:B11 = is Blank any player points should be added to cells K8:K11. I'm using this formula throughout cells K8:K28 =IF(J8>J25,1,IF(AND(J8<>0,J8=J25),0.5,0)) Any thing in red is incorrect anything in blue is what I'm trying to achieve.
View 4 Replies
View Related
Aug 17, 2008
We have a system that normally dumps our data in the format of column K, with all of the data in one column and the same spacing you see below in red. The problem is when the system is slow, we have to manually dump it, and when we manually dump it, it comes out spread out from column A to column I. For the macro to work without bugging out on me, it has to be in the same format as column K, with exactly the same spacing.
I have tried text to columns while importing, amongst other things, but have not had any luck. So in a nutshell I need to be able to make column A thru I, look just like column K with exactly the same spacing. The data dumps are different every day.
I have a strange feeling I will not get a reply on this question, because it is so strange, or that I failed to articulate it correctly....
View 9 Replies
View Related
Jan 18, 2014
I am using the following code to find a NAME in my work sheet and to enter their status. But this macro is not compatible if a duplicate or Similar name exist.What I need is I need this macro to activate the search NAME Cell and then a VB box with OK & NEXT button has to appear. if the activated NAME is exactly the one I am searching, then I will click the OK button then it should display the "Enter Employee Status" box and as continue in my code, But If I press NEXT, the macro should search the next similar NAME and activate it, This process should continue until I click the OK button. (Same like CTRL+F function with an additional Status entry button)
Code:
Sub Button1848_Click()
Application.ScreenUpdating =False
Dim BeginCol AsLong
[Code]....
View 4 Replies
View Related
Jan 19, 2010
I am new to VBA & not sure of the full understanding of code copied from a workbook which worked on the same principle but with Monthly (12) tabs. I thought if modified to show weeks, the macro would be able to locate the current week tab & day/date within - but upon opening, the cell stops at WK19 & column O - rather than WK43, Column N (which changes daily).
Sub Auto_Open()
week(1) = "WK1"
week(2) = "WK2"
week(3) = "WK3"
week(4) = "WK4"
week(5) = "WK5"
week(6) = "WK6"
week(7) = "WK7"
week(8) = "WK8"
week(9) = "WK9"
week(10) = "WK10"
week(11) = "WK11"
week(12) = "WK12"
week(13) = "WK13"
week(14) = "WK14"
week(15) = "WK15"
week(16) = "WK16"
week(17) = "WK17"
week(18) = "WK18"
week(19) = "WK19"
week(20) = "WK20"
week(21) = "WK21"
week(22) = "WK22"
week(23) = "WK23"
week(24) = "WK24"......................................
View 9 Replies
View Related
Jun 25, 2014
I am finding it very difficult to extract the Project reference data for each employee, I have attached sample working file for reference.
For Example
I have a project names in Rows and Employee names in Columns and each employee fill the working efforts in multiple projects and i would like to extract which all project they have worked for each month. Since the data is very huge i am not able to progress fast in collecting the data
Project NameEmp1Emp2Emp3
A
B 1015
C
D 2012010
Working.xlsx‎
View 5 Replies
View Related
May 9, 2013
I have attached sample sheet.
I need to populate the Rep Names looking up 3 Criteria (Client Id,Curr Cov Id,Dom Buy Grp Id) from the Table 1, either one matches the Rep Names has to populate.
The data has to be pasted on WIP_Sheet in different columns.
View 3 Replies
View Related
Oct 13, 2006
I have data that looks like this:
day# id amount
1 56575 0
1 56675 0
1 56680 0
1 56683 0
1 56681 0
1 51810 0..............
How do you write an excel macro that looks at the number in the first column (day #) and finds all the duplicate id#s in the second column that are in day 1and adds the amounts together in the 3rd column then writes the first column number (day#), second column number(id#) and the third column (sum of the amounts of duplicate Id#) to an new worksheet. Then the macro would loop through day #2 and do the same thing. Notice that the values in the id column are unique in this data set below this is how I would like the data to look. I have accomplished this in a pivot table but my problem is I need a cvs file to export the final data into an external database which is why I need a macro.....
View 2 Replies
View Related
Jan 7, 2013
I am trying to find a way to write a Macro that will auto color multiple cells based on what data is displayed in one cell. The cell I want to reference is a vlookup cell.
Basically this is a part label. And depending what part is selected from the list my vlookup will display its position on a vehicle(i.e.. FR, FL, RR, RL, Etc..). So if vlookup comes back with FR I want the various cells on the label to be orange, etc..
ALSO: if there is a way to embed it so it does this automatically (rather than run the macro each time).
View 7 Replies
View Related
Feb 1, 2010
I'm working on a project for my company. We make plastic tanks and for quality control we want to start recording the thickness of the tanks in different areas/zones of each tank.
Attached to this message is an Excel sheet that I've been working on. From "Sheet 1", it records inputted thicknesses into WorkSheet "1098". On the top of "1098", it shows all of the recordings, and just below that are the "10 Most Recent Entries".
Right below the "10 Most Recent Entries", there are formulas to calculate the Min and Max Values. Whenever a new entry is recorded, the selected cells for the Min and Max formulas change. Is there a way to force the cells to always stay the same?
View 3 Replies
View Related
Feb 22, 2013
Is it possible to see why this code returns a date that is almost correct? Searching for 01.01.2005 I get 01.11.2005 as result. I would like the code to only show the correct date, and if it doesn't exist it should end up showing "nothing".
Code:
Set fstdate = wsOBX.Range("B1:B" & lr1).Find(what:=startdate, _
LookIn:=xlFormulas, lookat:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
View 3 Replies
View Related
Mar 27, 2014
I'm trying to find the correct formula to sum text that meets two criteria. If C2:C1023 is Equal to TEXT from J8 and F2:F1023 is equal to TEXT J4 add up the total times J4 shows up in C2:1023
=SUMPRODUCT(Sheet3!C2:C1023=J8,Sheet3!F2:F1023=J4,Sheet3!C2:C1023)
View 11 Replies
View Related
Aug 5, 2009
I have run into serious trouble with a file I am working on. I have 12,000 companies (roughly), and each of them appears in an Excel file multiple times (some 1 time, other 18 times) with a few parameters. The big file (about 90,000 entries) is sorted so it looks like below:
I will illustrate for 2 companies:
Company A 0 200
Company A 0 0
Company B 300 400
Company B 0 50
I need for every company to do a countif for each column on condition
that the value is larger than 0.
In this case I would end up with:
Company A 0 200
Company A 0 0
Countif result 0 1
Company B 300 400
Company B 0 50
Countif result 1 2
However, I need to extend this to the whole 90,000 entries and 12,000 companies and this cannot be done manually. I thought about vlookup but that returns the first entry only, and I have multiple.
View 4 Replies
View Related
Feb 18, 2014
What I'm looking for is a formula that will search a data table on a source tab and find a value in a column. And have the ability to function like a vlookup and display the contents of cells in the same row on a different tab. The catch is the value will repeat it's self at random interval in the data table. So for example the values are ON-1 to ON-8 and MB-1 to MB-8. Each value will have it's own tab and I want the formula to search the Source tab and capture the value in order but on the next row of the spread sheet.
View 4 Replies
View Related
May 12, 2009
I have 2 columns, A (has the names of employees) and B (has the month in which the employee has a project scheduled). What I’m looking to do is find the latest month an employee has a project scheduled. Note: Employees can have a multiple number of projects so they may be listed multiple times with corresponding months.
I have each employee listed in column F and am looking to find their latest project month in column G. (I have the number that the formula should return in column H).
View 3 Replies
View Related
Aug 12, 2006
I am looking to find a cell value on a spreadsheet that has cells with multiple values listed in it. For example. If I CTR F for i.e. (745) on a spreadsheet that has this value in a cell that contains i.e. (684, 362, 745, ABC) all in one cell I get a no results. Ultimatelly, I'd like to run a Vlookup function on this file.
View 7 Replies
View Related
Jan 10, 2008
Look in Column A and find the cell that contains "Std A 1" and the cell that contains "Std A 2".
Compare the corresponding values in Column B, and multiply the lowest value by .2
I've tried using various methods (find, if cell.value.instr) but I keep getting errors. Can anyone point me in the right direction?
View 6 Replies
View Related
Aug 23, 2013
I have 2 sheets that i need to find what the same valued cells are.
1 sheet has names and i need to find the rows where those same names are on the 2nd sheet.
The formats are different (upper-lower case) and there is additional text as part of the cells in the 2nd sheet. (i.e prod123.web.corp.com) and i just need to find the prod123 parts.
View 9 Replies
View Related
Mar 24, 2014
Column A:
pants A green
Pants B red
Jacket C green
Jacket D blue
Polo C white
....
I need a formula to find some value( in our case "colors" = "green, red, blue, white" ... = 20-30 values), and to return in column B, the values, like:
Column A: Column B:
pants A green | green
Pants B red | red
Modern green Jacket | green
blue winter jacket | blue
Polo white D | white
I have different product feeds (csv) and i will like to search for colors in the product names.
View 2 Replies
View Related
May 22, 2009
I want to find sum of all 4 returned values (Sales!BL5, Sales!BM5, Grants!X5, Deferred Pymts!X5
Column References:
Cell AD2 (AMOUNT TOTAL PYMTS)
Cell AC2 (TOTAL NO. OF ORDERS)
Cell Range B5:B4833 on multiple pages (CUSTOMER NAME)
Cell Range AJ5:AJ4833 on multiple pages (CUSTOMER NAME)
Formula:
In Cell AD2 of CustomerData! Sheet:
If AC2 is not blank, then
look for match between A2 and Sales!B5:B4833, return the value in Sales!BL5, and
look for match between A2 and Sales!AJ5:AJ4833, return the value in Sales!BM5, and
look for match between A2 and Grants!B5:B4833, return the value Grants!X5, and
look for match between A2 and Deferred Pymts!B5:B4833, return the value Deferred Pymts!X5
Hope this does not confuse, but if John Doe is listed in AC2 I want to find the sum of his total payments if his name is listed as a customer in Sheets Sales, Grants, and Deferred Pymts. The Sales! sheet is divided into AM and PM pricing which explains why Sales! has Column B and Column AJ for Customer Names.
View 13 Replies
View Related
Mar 31, 2009
I am trying to find 3 values (X,Y,Z) in row A and concatenate those three values in column A for the entire range below, say A2:A100.
View 9 Replies
View Related
Jan 8, 2013
I want my IF function to populate two cells with two values if argument for IF function is found TRUE. Is it possible?
IF(logical_test, [value_if_true], [value_if_false])
value_if_true = return multiple values in mutiple cells (for example put number 8 in cell A2 and number 10 in cell A3 if function is TRUE)
How would I do that? I tried putting IF(logical_test, (A2="8",A3="10"), [value_if_false]) but it is not possbile...
View 3 Replies
View Related
Oct 7, 2006
Sheet 2 is the problem.
I need to match cells e3:h3 whenver the dates change in in cells c5:c9 and then put there result of cells b5:b9 into the corresponding cells of e5:h9.
Basically what I'm saying is that I want to keep a track of all previous pay amounts from each pay period. So when the next period changes the date it also copies the new pay amount to the corresponding date of the previous pay section.
I have included a sample.
View 9 Replies
View Related
Aug 22, 2013
SM extract 8.21.2013 Cust-sample.xlsx
I want to highlight the cells under System Name (col 1) in sheet 1 that are found in Host (col 1) in sheet 2 "OCPtabvHost"
The text isnt in the same format in the 2nd sheet (it is lower case and has additional text). I need to find the duplicate roots
View 8 Replies
View Related