VBA Code To Auto Populate Different Cells
Apr 30, 2009
I am trying to add some code that will auto populate cells based on entries and list selections. In the attached spreadsheet, when information is added to cells in column 'A', the date should auto populate the cells in column 'C'. When a status of "Complete" is selected from the dropdown box in cell 'B', the date should auto populate in the cell in column "D".
The code partially works in that it will auto populate columns "C" and "D", but the code errors out every time and I have to cancel the error to continue to the next entry.
View 2 Replies
ADVERTISEMENT
Aug 14, 2014
I am after a VBA code that I can use to populate a fax template based on criteria's
Basically I have records which are being logged throughout the day via a User form and sometimes there may/maynot be a charge. the user decides at the time. The column is named "to be charged" and is filled with either Yes/ No.
I need to be able to select the date to print or Just the same day date and print all faxes' that have "Yes" for charge This way all the information for each fax is populated and the user can just print.
and if possible mark a Colum non the master sheet as printed with a X or something
View 14 Replies
View Related
Mar 13, 2009
I have a report that I run off a database and extract to Excel.
It has 3 fields: Title; FirstName; LastName. For example sake lets say they are in columns A, B, C. Now in D I have a fieldname of FullName and in D2 onwards the formula: =A2&" "&B2&" "&C2.
Now I currently manually type the formula and drag it down to the same row as the last entry in the first 3 columns so that I get the full title in one cell.
I wanted to know how I could enter the the formula above in column D so that it automatically does this for me?
I tried to record a Macro as a test for column D setting the field name in D1 and the formula in D2 and got the following:
View 2 Replies
View Related
Jan 2, 2010
I have a workbook with three sheets:
'Activity' 'Expenses' and 'Income'
On the 'Activity' sheet I:
select the date,
select the description, and
select the category (dependent on the description using indirect)
and enter a value. ($ dollar amount)
How do I make the entered values appear automatically :
- on the correct Sheet for the Description - 'EXPENSES' or 'INCOME'
- in the correct columns (matching) the category
- and in the correct row (matching) the date,
- "add to" - if a value already exists in the cell (more than one transaction on a date)
after they have been hand entered on the 'Activity' sheet?
View 7 Replies
View Related
Dec 10, 2009
I have a database in the form of a spreadsheet with the following column headings:
A=DATE (3 letter abbreviation for the month...jan, feb, mar, etc)
B=Client
C=City
D=State
E=Department
F=Contract number
Is there a formula that I can enter in another worksheet (which is being used as a report), that will "grab" the monthly data for all entries for a given month (i.e. "mar"), and auto-populate corresponding cells with each?
View 9 Replies
View Related
Aug 27, 2009
I have my projection formulas that use the date and age to estimate production on each farm. Basically the age is calculated first and then the production rate is estimated. I have been trying to figure out if, instead of having a formula in each cell, can I use VBA to populate the ages and then the production.
Here is an example:
8/22/2009
FarmAge8/22/09Age8/29/09Age9/5/09Age9/12/09Age9/19/09Age9/26/09Age10/3/09Farm 1
34181351813617937179381793917940177Farm 2
39223402204122042220432204422045218
All the functions I have created work, I just can't have the worksheet auto-calculate due to the total number of cells with functions. Calculating the worksheet takes approx 1 min...
I should be able to adjust any code to the ranges needed, but this example shows the basic layout.
View 17 Replies
View Related
Jul 31, 2012
How can I auto populate certain relevant cells that has been chosen by input in a different worksheet?
Example:
Input cells in Worksheet 1:A1= 100 (Data to Show in Periods chosen below)
A2= 3 (begin period)
A3= 5 (end period)
Result on worksheet 2: A1(PERIOD 1) = 0
A2(PERIOD 2) = 0
A3(PERIOD 3) = 100
A4(PERIOD 4) = 100
A5(PERIOD 5) = 100
A6(PERIOD 6) = 0
A7(PERIOD 7) = 0
View 4 Replies
View Related
May 27, 2014
The file is attached here. I would like to be able to autopopulate cells based on a dropdown. The first tab has the final report and the other 2 tabs are the raw files.
KMPH_Inventory.xlsx‎
View 1 Replies
View Related
Nov 26, 2012
I'm trying to figure out a way to populate multiple cells automatically with certain information after entering info into a single cell on a separate worksheet in a separate workbook.
Our "master" sheet has 22 total columns (A-V), and our weekly "status" sheet only has 7 total columns (A, E, P, L, M, N, R).
Column A on both sheets is labeled "Sample Number". On the "status" sheet I want to be able to type, for instance, "2012-228" into A2 and have the corresponding values from Columns E, P, L, M, N, R on the "master" sheet automatically populate into B2-G2 on the status sheet if this is at all possible.
View 5 Replies
View Related
Dec 20, 2012
I need to auto populate an excel spreadsheet however it has 3 criteria to match. Pressure, size and name. I need to somehow lookup the name and if it matches the pressure rating and size then return the quantity in that cell. There is 2000 cells and I am sure there is a logic function or someway to complete this task faster then manual entry.
View 4 Replies
View Related
Dec 16, 2013
I am looking to auto generate a roster/schedule. I have a spreadsheet with shifts for each weekday that I need to populate every week with names to pick from a drop down list. the drop down list is made using data validation and looks at a dynamic named range to allow me to select only the people who are available to work a certain shift.
Is there a way to do this using vba?
View 3 Replies
View Related
Sep 26, 2007
My sheet goes from monday to friday on the coulombs. On the rows i have various data sections for each day. I would like the data on the last day (any day after monday) that there is data for a sheet to input that data into the monday slot when the "master date" is changed on the cheese sheet. The idea here being that the script will take the last entered data for a given sheet, and put it into the monday coulomb on the same sheet when the date is changed. This is kind of hard to explain so if you need clarification let me know. Attached is the sheet i'm working with.
View 14 Replies
View Related
Jul 25, 2014
I have a column of values (E4:E87). I'm adding 1 value to this column manually each day...so tomorrow (July 24th) I will have E4:E88...and so forth. Each day is a new row.
In column Z (i.e. cell Z87) I have the formula =(SUM(O53:O87))/(SUM(E53:E87)). Z88 will have
=(SUM(somevalue:O88))/(SUM(somevalue:E88)). This gives me a resulting percentage for a rolling period of time.
I need an automated way to populate "O53" and "E53" ("somevalue") in the formula so that the SUM of the current row's cell (i.e. E88) through [whatever] is 50 or greater. (The sum of the values should be as small as possible, but at least 50, and should not include any older values than absolutely necessary for it to equal at least 50.)
An image of my spreadsheet can be viewed here: [URL]
View 3 Replies
View Related
Nov 23, 2008
Is it possible for the tab name to auto populate from a specific cells contents?
View 9 Replies
View Related
Nov 29, 2010
I'm creating a configuration tool for instrumentation that has several options. Many of these options are dependent on one another. To summarize, I need to:
*Conditionally lock cells (and populate with "N/A") OR allow selection from drop down list - the list exists, it's the locking and auto-population I'm struggling with
Example: If A1 = No, then B1 = "N/A" and is locked, else allow selection from drop down list in B1
View 3 Replies
View Related
Feb 6, 2007
I have a button in a spreadsheet that auto populate's certain cells with this script very simple.
Sub Bundle_8230()
[C242] = "HP NC8230"
[C243] = "Deluxe Laptop Bag"
[C244] = "Travel Battery"
[C245] = "Mouse"
[C246] = "Keyboard"
[C247] = "Port Replicator"
[D242] = "1"
[D243] = "1"
[D244] = "1"
[D245] = "1"
[D246] = "1"
[D247] = "1"
End Sub
What i would need is a script so that it doesn't look at those specific cells
but a range of cells and every time the button is clicked it will fall into the first empty cells.
So example when button is clicked
Case 1 if cells C242 has something look at cell C243
If cell C243 has something look at cell C244
If cell C244 has nothing then enter data that goes with that button.
I have around 6 to 7 different buttons.
View 9 Replies
View Related
Jul 29, 2014
I need the tabs of a project action log to auto-populate and auto-delete in a master log. (So when something is added or deleted in a tab it is added or deleted on the master) I use excel a little bit for work and personal finance purposes but I have zero experience with macros or VBA.
View 1 Replies
View Related
Feb 18, 2014
The code below works correctly on certain sheets. The code is supposed to loop through worksheets in an array, calculate the percent change from 1990 to 2012 and from 2005 to 2012, and put the calculations on the 4th and 5th row from the last non-empty row, respectively. All the sheets are identical except for 3. The sheets that are different only have a different number of years of data. For some reason this causes the macro to put the percent change calculations in random rows below the correct location. Also, the macro doesn't work correctly on one of the identical sheets.
[Code] ......
Example of how the macro runs correctly on an identical worksheet : correct.gif
Example of how the macro runs incorrectly on one of the 3 sheets that are not identical : incorrect.gif
View 6 Replies
View Related
Sep 2, 2013
I am trying to auto-populate text in cells in area A, based on data I enter into other cells in area B. I want the area A cells to be for display only, as all editing will be done in area B. The problem is: how do I do this such that the text I write does not get cut off if is longer than the column width? See the attached document for a clear example and description of what I am trying to do...
Excel Q.xlsx‎
View 7 Replies
View Related
Jul 31, 2013
I am trying to auto generate a calendar based on two drop down menus - Month and Year.
Once the month and year is selected I want to import all work orders onto the calendar based first on the "Labor Name" found in the list of work tab, then assign each work order for that labor name to the respective date on the calendar for the month.
August PM Schedule Demo.xlsx
View 2 Replies
View Related
Jul 9, 2009
Is it possible to create a macro which adds a new sheet and names the tab from a cell value somewhere?
View 5 Replies
View Related
Jun 26, 2013
I have 5 columns: A, B, C, D & E of which I have drop downs for: Yes, No, Maybe, Not Sure for A, B, C, & D. I need column E to offer a hyperlinked mailto:ask@bob.com when A, B, C have Yes, Maybe or Not Sure selected. If Yes, Maybe or Not Sure is selected for D, I need to have a hyperlink mailto:ask2@bob2.com. When no is selected for any of them, I need to have it say None.
View 9 Replies
View Related
Oct 29, 2009
The first tab I have a summary sheet which I want to auto populate with a sumproduct function, the second tab is where the dates and values are I wish to sum the value if it’s returned in January. I had a go to try sum the entire range see below but it’s not working
=SUMPRODUCT(--('Alex Guest - Scotland'!$G$19:$G$1048576>=1/1/2009),--('Alex Guest - Scotland'!$G$19:$G$1048576<=3/1/2009),--('Alex Guest - Scotland'!$H$19:$H$1048576))
The ultimate goal I am trying to achieve is if there is a date in January in the date returned column and the php column does not contain a value I want it to sum in the summary sheet in January. Hopefully if anyone can advise that would be great then I can look at the formula and try workout to sum only if there is a value in the php column in January
View 3 Replies
View Related
Dec 20, 2009
on Sheet 2, I have a very long list of names and addresses. What I am trying to do, is to have the correct address auto populate in Cell B253, depending on which name I type into Cell B252.
The formula has to be able to determine which name is typed in cell B252, i.e., John A Doe, and then auto populate his address in cell B253.
View 9 Replies
View Related
Aug 3, 2007
My macro runs, and it inserts a cell, but in order to record data on a summary page, I need a formula to auto populate, and I've tried having the macro copy/paste and I've tried ActiveCell.Formula...and nothing seems to be working. The formula needs to go into Cell B3.
View 9 Replies
View Related
Mar 25, 2014
I would like to enter a name in E11, and then have G11 populate the name of the company that person belongs to, from a different sheet.
If the person is new, the company name entered into G11 should create a new column on the Companies sheet.
I've attached a dummy sheet which should make it more clear.
DummyCompanyPopulate.xlsx
View 9 Replies
View Related
Apr 3, 2009
i have been trying to write an Excel sheet in 2007
that can be given a random amount of (money) and show
me the best way to spend it.
Weapons:
Name - Power - Cost
1 - 10 - 20
2 - 20 - 40
3 - 40 - 80
4 - 80 - 160
5 - 160 - 320
6 - 320 - 640
So i have 40K to spend, i want to eneter 40000 into a box and it
will auto populate the number of units i can buy, always setting the weapon
#6 as the priority.
View 13 Replies
View Related
May 22, 2012
I am populating column D with
=IF($C2="","",VLOOKUP($C2,Name_ID,2,FALSE))
Based on selection in column C populated using a drop down list from a range titled PracticeID. Other named ranges, all on sheet titled Validation, are PracticeName and Name_ID (a 2 column range made up of PracticeName and PracticeID). This works great the first time a selection is made in column C. But, of course, if the user needs to change the selection in column C, the value in column D does not change. Would the cell change event be the appropriate place to place this action?
View 1 Replies
View Related
Nov 19, 2013
I use the code below to autocreate a folder and hyperlink to it. It creates a folder when I enter a drivers name in column D it then turns the name into a hyper link to that folder - my problem is I have 2 files in the drivers folder on the C drive - one called wkd.xlsm (a small spread sheet) and one called notes.txt (a notepad document) I would like these files to be automatically added to the folder that is created when I add a drivers name to the D column - I would also like a hyperlink to be created to the wkd file in column H and a hyperlink to the notes file in column X.
Private Sub Worksheet_Change(ByVal Target As Range)
folderpath = "c:drivers"
If Not Intersect(Range("D3:D1000"), Target) Is Nothing Then
If Target.Value "" Then
If Dir(folderpath & Cells(Target.Row, "D") & " " & Cells(Target.Row, "C"), vbDirectory) = vbNullString Then
[Code] .........
View 5 Replies
View Related
Sep 5, 2008
here is a formula i would like in cell D20 (might not be a formula out there,maybe more code)
if cell C20= "S" then text in Cell D20= "SHOP" (then will be able to type after "SHOP")
if cell C20="F" then text in Cell D20="Field" (then will be able to type after "Field")
I have many facters (15 to be exact) that I would like to do this in the range of D20:D38
View 9 Replies
View Related