Autofill Data From One Tab To Another Under Certain Criteria?
Jan 5, 2012
I enter customer details onto an excel 2010 spreadsheet, ie customer name, date, description of order, amount of order etc. Sometimes, under certain criteria, the same or part of the same information needs to be added to another tab, ie tab2, on the same spreadsheet. I wanted to create an automated system to populate tab2, but cant figure out how.
I thought about creating another column in tab1, before all the customer information, which had a dropdown list option for yes/no when asked the question 'does it fit the criteria to add customer information to tab2'. This column would act as an alert, so that if i selected 'yes', then any customer information i enter in tab1 would then populate into tab2.
View 7 Replies
ADVERTISEMENT
Nov 14, 2008
Id like to apply a formula, any formula to an entire column if it contains data, and incorporate the original data in the calculation and then replace the original data with the result. I don't want to have to create new columns.
I'm using this to fix up database results; a common problem is dates in dot format e.g. 14.11.2008
All I have so far is an autofill formula that overwrites everything. Can someone help me with the rest? I'm using the SUBSTITUTE function to replace the dots '.' with slashes '/'
Sub Create_formula_result()
Dim Limit As Long
Dim r As range
Set r = range("A1")
r.FormulaR1C1 = _
"=IF(RC[0]"""",(SUBSTITUTE(RC[0],""."",""/"")+0) ,"""")"
Limit = ActiveSheet.UsedRange.Rows.Count
r.AutoFill Destination:=range(r, Cells(Limit, r.Column))
End Sub
View 9 Replies
View Related
Dec 29, 2013
My main data tab is collecting gallons pumped for a particular piece of equipment. I have a drop down box to populate the piece of equipment and VLookup to identify the unit number associated with the equipment. I would like to create a separate tab for each piece of equipment that will track the number of gallons pumped during the calendar year. Here is the format for the main tab:
DateBeginning Meter ReadEnding Meter Read GallonsEquipment IDEquipment Description
1/2/2014565443565625 18212006 ford f250
1/10/2014565625565675 5022006 Chevy 2500
1/11/2014565675565750 754Ford Taurus
1/12/2014565750565830 8012006 ford f250
1/13/2014565830565900 7012006 ford f250
1/14/2014565900566000 10012006 ford f250
1/15/2014566000566125 12512006 ford f250
1/16/2014566125566215 9012006 ford f250
Here is the format for each piece of equipment:
2006 Ford F250
Date Gallons
1/2/14 182
1/12/14 80
1/12/14 80
1/12/14 80
1/13/14 70
1/14/14 100
1/15/14 125
1/16/14 90
The formula I used in Cell A4 is =INDEX(Gasoline!A4:A23,MATCH(1,Gasoline!F4:F19,FALSE),1)
Cells A4 and B4 have the correct values. My problem comes in A5,A6 and B5,B6. These should not have a result because they are different pieces of equipment. Throughout the year, each piece of equipment is going be used on the main tab. How do I keep the individual tabs from picking up the same entry multiple times.
View 2 Replies
View Related
Jan 21, 2010
I have one row which contains a different formula in each column. Is there any way I can have a macro autofill the data from another table?
I would need it to:
Apply a number of formulas to a row,
Find the last row of a table
Apply the autofil based on the row with the formulas.
View 4 Replies
View Related
Jul 18, 2012
I have the macro to insert a formula and copy it in a range("A2:A14", but I want the end of the range in column A to be the last row with data in column B. How to add that in?
Sub vlookup()
Range("A2").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[1],'[Old.xlsx]Total Student Count Data'!R2C2:R1000C2,1,FALSE)"
Range("A2").Select
Selection.autofill Destination:=Range("A2:A14"), Type:=xlFillDefault
Range("A2:A14").Select
End Sub
View 2 Replies
View Related
May 29, 2014
I'm trying to autofill data in a column from one sheet to another in the same workbook. My goal is to be able to paste data in one sheet and have it appear in another sheet.
View 2 Replies
View Related
Jan 11, 2009
1.
column b should autofill the last number in column i
in this case b12 = £1820.58
and then evertime column i has data in it should go to the next row in column b
2.
i would like column d to be blank until there is a stake in column c
3.
the same for column f, h and i
4.
column l should have the date auto entry after column c has data input
5.
column n should automatically work out how many days this has been running
6.
sheet 2 cell g5 should know how many records are in sheet 1
7.
sheet 2 cell g6 should return all known "y" in sheet 1 column g
and g7 should return all known "n" in sheet 1 column g
column i.........................
View 2 Replies
View Related
Feb 27, 2009
On Sheet1 I have a small list of names in column A and a number next to the name in column B. This number may vary.
What I want to do is on Sheet2 in column A repeat the name based on the number from sheet1 in column B.
Now the sheet is shared among all of us and macro are out. Is this something that is possible with a function?
View 9 Replies
View Related
Nov 2, 2006
I have used the following VBA quotes for my workbook to remove auotfills and data that I want to remove from my worksheet. The workbook has multiple worksheets and the worksheet that I want to use this VBA on is on worksheet 10 (ie. Sheet10). what's wrong with the VBA codes that I have below? Currently nothing happens whenever I try to click on the button that's linked to this code and there's no error message.
Sub ClearStuff()
Dim rng As Range
For Each rng In Sheets(10).Range("C18:BV" & Sheets(10).Range("B65533").End(xlUp).Row)
If rng.Value = Sheets(10).Range("D11").Value Then
rng.ClearContents
rng.Interior.ColorIndex = xlNone
End If
Next rng
End Sub
View 2 Replies
View Related
May 21, 2013
Here My first thread autofill horizontally from other sheet vertical data.
Vertical Data
Sheet1
A1
A2
A3
A4
& so on
AUTOFILL HORIZONTAL DATA
Sheet2
D3,D4,D5,D6..... fill by A1 A2 A3 A4.....
View 5 Replies
View Related
Jun 22, 2009
I have an excel file that contains two sheets. Sheet2 contains rows of different types of products with each of the columns containing details about the product.
On Sheet1, I have setup a data validation list in which a certain cell contains a drop down box that selects a product from the first column of all the rows on t from Sheet2. I used
View 3 Replies
View Related
May 13, 2006
I'll do what I can to explain this mess I want to clear up...I have a series of excel reports I have to download and work thru daily and I need to see if there is a code to autofill down thru a column, based on multiple statements throughout the column..here goes:
f1 msp
f2 msp
f3 blank **
f4 mct
f5 mct
f6 mct
f7 blank **
f8 cci
f9 blank **
Regardless of the actual f cell, I always will need to fill the Blank ** cell w/ the values from the previous cell....Hope this makes sense...& thanks in advance....
have_a_cup@cox.net
View 5 Replies
View Related
Jan 20, 2008
Here is my test example I am trying to figure this out with.
Sub a()
Dim rg As Range
'set formulas to be filled
Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=IF('sheet2'!RC="""","""",'sheet2'!RC)"
Selection.AutoFill Destination:=Range("A1:L1"), Type:=xlFillDefault
'now get autofill to populate until no more data on sheet 2
Set rg = [a2]
Set rg = Range(rg, Cells(Rows.Count, rg.Column).End(xlUp))
rg.Cells(2, 2).AutoFill Destination:=rg, Type:=xlFillDefault
End Sub
Without VBA, once I set the formulas for A1:L1, I can use the mouse to autofill all columns until Im around row 27,000.
Id like to be able to run a check for the end of data in sheet 2 so that if the sheet2 changes, it will all be included.
The resulting sheet1 cannot have any null values, so a perfect end of data check is necessary.
View 9 Replies
View Related
Jun 21, 2013
I would like to enter a long line of data (text & numbers) into a single cell and have the single cell data populate successive horizontal data fields with automatically. The single cell data would have properties that would correspond to specific properties in the successive fields. The single cell data would remain unchanged. The successive horizontal cells would be looking for a specific piece of the single cell data.
View 1 Replies
View Related
Jan 9, 2014
My Table has a data validation list in one row of a table. And different formulas in different rows.
The Table is expanded only into columns. Which means, there will be no new rows...only columns will be added.
If we enter text into the header cell in a new column, the whole new column gets formatted, but the list and formulas do not auto fill into new columns.
Of course an easy way is to copy and paste a column...but is there a way to auto fill lists and formulas into columns of the table? Similar to how the rows get autofilled?
View 4 Replies
View Related
Jan 23, 2014
In earlier versions if I used the double clicked the autofill handle it would only fill down to the next adjacent cell containing data. Now it fills down to the bottom of all the data regardless of whether there is a blank cell or not e.g
X X X Z
X X X Z
X X X Z
X X
X X X
Now this happens
X X X Z
X X X Z
X X X Z
X X ...Z
X X X Z
How can I stop this as I need to enter different data in the next section?
View 1 Replies
View Related
Jul 28, 2014
I'm trying to autofill a series of rows (that are blank) with data from an above row. I want to autofill the row in its entirety, not just filling in blank cells.
For instance (assuming comma is a new column). Colors listed are just a data example. Space between commas indicates a blank cell:
142, RED, GREEN, , YELLOW, , BLACK, PURPLE
(blank row)
142, GREEN, RED, ,BLACK, , PINK, ,
(blank row)
(blank row)
(blank row)
154, YELLOW, BLACK, , GRAY, , PURPLE, RED
(blank row)
(blank row)
So rather than it just completing the task in one desired cell, it would complete the task over the entire spreadsheet. Data spread can be as far as row 500 and column BY, so you can see how a copy + paste or a drag would get monotonous.
Another small example data set:
1,1,1453,0,10,-35
(blank row)
(blank row)
0,0,1448,0, ,-35
(blank row)
1, ,1443,1,3,-36
1,2,1408,2,7, ,
(blank row)
(blank row)
(blank row)
1,2, ,2,7,-39
(blank row)
(blank row)
1,3,1344,1,10,31
And column A will always have data (unless the row is completely blank.
View 1 Replies
View Related
Aug 10, 2013
I want to Autofill a Column C to repeat a set of data in Column A, if Column B contains an integer, as shown below. Being able to Autofill this data allows me to have a dynamic table for use on multiple projects that may have a different amount of rows in Column B.
Outflow % Table
25
50
[Code]......
View 6 Replies
View Related
Feb 8, 2014
I have a spreadsheet that is updated weekly -- but every week new info is added that needs a user to input corresponding info. I use a vlookup function to link to another spreadsheet that populates the info from previous weeks and the info that is missing shows up as #N/A...
First I was using a msgbox function to get the info:
HTML Code:Â
For Each b In myrange
If Application.IsNA(b.Value) Then
Employee = b.Offset(0, -2).Value
SSID = InputBox("Please enter ID# for " & Employee & " :", "New Employee Found")
b.Value = SSID
End If
Next b
But it can be up to 30 different new employees... and that is time consuming.
I would like to make it more user friendly by creating ONE userform that displays all of the employees as labels -- has a text box in which to put the ID # -- and then has a drop down box to choose the type of employee (2 options). I want all of that info to go back to the reference spreadsheet so it will be saved for following weeks, and then redo the vlookup to get the info into the new weekly spreadsheet (I can do that part)....
HTML Code:Â
Private Sub CloseButton_Click()
Unload UserForm1
End Sub
Private Sub ComboBox1_Change()
[Code] ......
View 2 Replies
View Related
Mar 10, 2009
Need in displaying data by user input criteria, mulitple rows of display also need to display to blank out when no criteria is input. In example spreadsheet the criteria cell is B6 in "Results" page and needs to pull in data from the "Database" page.
View 3 Replies
View Related
Oct 17, 2012
I have a workbook with 3 sheets
Sheet1 - TeamList - Column A is a list of all the team leaders which is used to create a new worksheet for every team. Col B is blank. Column C, D, E are the team lists where teams can consist of anywhere from 10-25 employees.
For example
Column A
Column B
Column C
Column D
Column E
Team Leaders
Team Leader
Employee
Pin
TL 1
TL 1
Emp 1
10001
[Code] ......
Sheet2 "RawHours" A raw data sheet that contains employee hours information
For Example
Employee #
PIN
NAME
Reg
OT
TRN
Stat
Sick
Vac
Berv
2000100
10001
Emp 1
24.00
0.00
[Code] .......
Sheet3 - Template
Basically what I want to be able to do is create a sheet for every team leader and copy and paste there team into the appropriate sheet.
I have the sheet create done by simply copying the template and renaming each sheet using the Team Leaders list from column A from the TeamList sheet. And then I copy the page setup information using the template as well but when it comes to pulling over the appropriate team members in to the appropriate sheet I can not seem to wrap my head around it.
Below is the current code I am using:
Code:
Option Explicit
Sub CreateSheet()
Dim LR, i As Long
Dim shCount As Integer
Dim Sh As Worksheet
Dim Cell As Range
Dim CpySht As PageSetup
[Code] ........
View 3 Replies
View Related
Aug 31, 2006
Hi, have a question regarding dynamic charts, specifically I am trying to create several dymanic charts based on data in a single column (So i can only say my first set of data will be starting a a set location in the chart, the rest has to shift down based chart data above it). This data should organized in charts depending on the data in several other columns. For instance, need to pull out values from column based some ID and some PartNumber. A sample excel or VBA would be much appreciated. I know VBA but do not know Excel VBA much.
View 9 Replies
View Related
Jul 29, 2012
i have a treatment centre with 22 rooms some with mutiple beds, i need to view occupancy in a grid form to optimise bed useage. i need to look up a date that is after arrival but before depature that matches a room number, i have tried match, index, and, vlookup etc but all this info must exist on the same row
View 1 Replies
View Related
May 21, 2008
I am creating a graph which charts the most recent 3 years of YTD data, and right beside it, the past 13 months of monthly data. The data comes from two other worksheets and is brought in with an Index/Match formula, but to create the chart without having to go and update the data series every month the data to chart (in row 46 to 49 of attached worksheet) needs to change each month according to data in rows 2 & 3, and when the Year changes, in rows 24 & 25. I am trying to do this an offset, and/or vlookup, and/or counta functions.
View 5 Replies
View Related
Nov 3, 2009
I am trying to simplify my data entry and I have this idea that I do not know how to tackle, but it would be nice to have it worked out.
I am looking for an autofill macro that will fill column B2 to Bxx with values from 1 to max value specified in cell B1. Lets say I know I have 5 trees I need to enter. I want to enter "5" in a cell as a reference, and everything else will be filled in automatically with press of the button.
To make things even more productive I would like to use value from cell A2 and replicate it through the range specified above in column A2:Axx.
Result: ....
View 6 Replies
View Related
Mar 13, 2009
I have this ActiveCell.Offset(0, -1).Range("A1").Select. Selection.AutoFill Destination:=ActiveCell.Range("A1:A6"). However I need to copy the value down, so it is identical to the Range("A1"). At the moment it adds one year to each value when copied down. e.g. A1 = 12.01.09. and it copies it down so I get 12.01.10, 12.01.11 etc... I want them all to be 12.01.09
View 3 Replies
View Related
Nov 13, 2009
I am looking for a way for my macro to select cells C4:T4 and then auto fill the formulas down to the last row with data. I have found suggestions when working with one cell to auto fill, but cant seem to find a way to do it with a range of cells
View 2 Replies
View Related
Dec 29, 2009
I have a Macro and I need to code it to Autofill a formula in column B with data from A and I need to set it to AutoFill to the last row. Probably basic but I've tried a couple posts previously and I am just not getting it. This is what I currently have. Sorry, I recorded it and have some additional steps in here I don't need.
View 6 Replies
View Related
Apr 23, 2009
I have a piece of code that includes the following line:
Selection.AutoFill Destination:=Range("B1:B9414")
I want it to always autofill to the last row that has content in it. I have been changing the value to a large number that I know is always more than the content of the worksheet which changes periodically, but I would rather it always only go to the last row that is not empty so I don't have to go back and delete those extra rows.
View 9 Replies
View Related
Dec 27, 2008
I have a spreadsheet with data where the number of rows change daily, in column D.
I have formula in column E which I autofill manually by double clicking on the cross thingy of the first cell.
However I'm trying to do it using VBA, but it always stops at a certain row and not where the column D data stops.
Below is the macro which stops autofilling at row E7762
Selection.AutoFill Destination:=Range("E3:E7762")
Is there a way to amend the VBA to autofill based where Column D data stops?
View 9 Replies
View Related