I want to create a list from a "seed" word that consists of a word followed by a number (ex: seedword100).
What I want to do is to be able to create a list in Excel using that seed word and then have excel produce a bunch of replications of that seed word by incrementing the number part of the seed word by 1 for every replication.
So, for example, if cell A1 = "seedword100", I want Excel to replicate it up to "seedword199" like this...
I have created a macro that searches for an existing part in my worksheet and copies the found part to the row above. I would like to increment the value of cells B and H in the new copied row. Both cells contain an alphanumeric string that ends with a numeric value. For example cell B has a string like this "APL-DK0030" and cell H has a string like this "Dell Optiplex GX260 V09"....
Is it possible to increment / decrement cells using wild characters? I've found myself needing to increment values at different position, for e.g. :
ABC-###-FR05-AB ABC-222-FR##-AB C##445-KJ
where I would want to be incrementing # placeholders. It would help if I can give it a start number, and the increment amount (which can be different than 1).
What about possibly extending it a bit more to include two or more place holders at the same time as follows:
ABC##- FR*** (where # would have its own starting number and increment value, and * would have its own).
I need to automatically populate a column with an alphanumeric MFR0001 to MFR9999 and am currently using the formula below to add 1 to the start point (A1)...
A1=MFR0001 Formula in A2 =LEFT(C1,3)&(RIGHT(C1,4)+1)
This works perfectly if I start at MFR1000, but breaks and drops the 000 if I use it on the number I need to start with (MFR0001).
I have a workbook with ten sheets. The front sheet is a summary with nine divisional data sheets (DDS) following. In every sheet cell G12 has the date. At the moment the DDS reference the summary sheet and pick up the same date from it. Is it possible to set it up so that if I change the date in cell G12 on any of the sheets I can get them to all read the same?
I'm exploring a different approach to my current project.
Sheet1, CellA1 contains the year ie. 2007 Sheet1, CellA2 contains the storage directory ie. E:archiveyear Sheet1, CellA3:A10 contains the names of the employees.
Here is what I would like to make happen.
Running this in a macro, the result would be a copy of Workbook2 renamed for each employee's name in cells A3 through A10 and all saved in a newly created directory of E:archiveyear2007employee name1.xls E:archiveyear2007employee name2.xls and so on..
I have a userform that has nested multipages (5 in the outer page, 4 in the inner page).
On each of these multipages, I want to have the same controls (sliders) laid out in the same order - but with unique names, named after their tab location, for each control so I can use their value property later in the code.
I've designed the layout and named all the controls on my first sheet (e.g. Slider1Outer1Inner1). I now need a way of automating the replication of these across the other 19 sheets (including the nested inner multipage!); so that equivalent slider for example would be called Slider1Outer1Inner2, Slider1Outer1Inner3 etc.
I'm not sure about coding VBA to act on items within VBA...
VB: " For each multipage in outer For Each multipage In inner For Each Object In current multipage Copy inner.object -> Next multipage Inner.object.name = CurrentOuter & CurrentInner & CurrentSlider "
if i create a record in 'XYZ' worksheet, it should create the same record in TARGET worksheet.
Likewise, if i create a record in 'ABC' worksheet in the same workbook, it should create the same record in the SUBSEQUENT ROW of the TARGET worksheet.
For this to happen, it must be done programmitically either using a MACRO or VB Script.
I understand the end(x1Down), but i think I am missing something. I just want to go to the next cell left, right or Up, Down from whatever cell is currently selected. How do I replicate a 1 cell move as an arrow key would do?
I created a UserForm to populate client billing info and job location info (so it's a two-parter). A clicked button will then populate a spreadsheet with all of the information. That part works fine.
When the client billing info is the same as their job info, I'd like to offer a checkbox that will populate the job info with the billing info rather than having to type everything twice (like you see on online billing and shipping orders).
I am trying to rebuilt a chartsheet without using copy/paste. I have chartsheets with 2 or more charts on it. I add a new chartsheet, then add a new chartobject and then I want to copy the same series ( name, xyvalues, values). Unfortunately it doesn't work.
Sub ReplicateCharts() Dim Cht As Chart Dim NewCht As Chart Dim ChtObj, NewChtobj As ChartObject Dim SrSerie As Series Dim ns As Series Dim x As Variant If ActiveWorkbook.Charts.Count > 0 Then For Each Cht In .Charts Set NewCht = .Charts.Add() NewCht.PageSetup.Orientation = Cht.PageSetup.Orientation For Each ChtObj In Cht.ChartObjects...........................
If I need to replicate a formula in some cells, I usually drag it down or sideways. Is there any easier way to do this? I have large numbers of cells into which to drag the formula. Can I specify which cell range the formula is applicable to (i.e. A1:A10,000 or something) instead of dragging? If so how?
Actually i can do it just by using LOOKUP formula but the mark scheme says LOOKUP and IF.
If i use Just LOOKUP i should do the same thing for other cells but i want to generate a formula and replicate it through all the cells.
Here is the question; Enter formulae in cells C2:C10 that refer to Book Orders.CSV and display whether the Text Book is Required by the student whose Student id is entered in cell A2.
I have two formulas which I'm using: =180*(120.5-1)/119.5 and =90*(60.5-1)/59.5 In the first example, I want to replicate the formula across row 1, but with the value '1' incrementing by 1 each time, upto 240.
In the second example I want the '1' value to also increase by 1 for each cell down column B, up to 120. when I try dragging the formula down or across, I am only able to replicate the formula exactly as in the initial cell (ie. the '1' doesn't change). I've tried using the $ symbol, but this doesn't work. I don't fancy doing this manually for a total of 360 cells!
I have a single sheet broken into multiple sections of 10 rows (see attached). The first 5 rows of the section are formatted and I need to Insert 5 rows underneath and format them the same. I can't work out how to do this for the different sections (ie: add 5 rows to section 1, then section 2 then 3). These functions will be on separate buttons to use multiple times. I would have used multiple sheets but the project calls for a single sheet representation.
I've got this relatively simple file I use to calculate some values for a game mod. Its currently using ad-hoc excel functions, but its maths related to aerodynamics and they get unreadable quickly. I'd like to move to VBA functions for ease of maintenance, and programming the maths part of the code has been no issue so far.
However, I don't understand how to replicate the functionality of the default maths functions regarding range inputs.
Simple example, one of the intermediate values is the Aspect Ratio of the wing:
This works fine with both numeric inputs, cell references, or, as shown here, defined range names.
However, my VBA version:
Code: Function AspectRatio(b_2 As Variant, mac As Variant, Optional round As Integer = 3) As Variant AspectRatio = Application.round(2 * b_2 / mac, round) End Function Only works with single-cell references or numeric inputs.
When called as:
Code: =AspectRatio(Semi_Span, Mean_Aerodynamic_Chord) It fails.
From my limited understanding - I've only started looking into VBA about 2 hours ago - I need to do a IsNumeric test on the inputs in question, and then use the row from Application.Caller.Address to select the right cell if the input is a range? Am I on the right track?
How to craft a Sub I can call in the 15+ math functions I made.
The background to this question is that I'm trying to replicate conditional formatting using a user VBA function, because I require a thick border around the cells (and the conditional formatting within Excel only has thin borders)
In the final function, there will be 9 combinations of formatting {Red, Amber, Green} interior with {Red, Amber, Green} thick borders.
The formatting is determined by a number in another cell (the "target" cell), which returns a value 0,...,8
I've only got as far as filling in the interior for the first combination, but the function returns an error "Application-defined or object-defined error".
VB: Function VBA000_003_SetRAG(strTargetRange As String) 'strTargetRange is the reference for the target cell that contains the value 0,...,8
On Error Goto handler [code]....
There is not a problem with the target range, if I remove the two lines relating to rngCaller then the function works OKExecuting the rngCaller.Interior.Color = RGB(255, 0, 0) command through the Immediates window works OKI've tried calling a subroutine & passing the range across
Same errorChanging the range in the subroutine to an absolute range (eg. Sheet1.range("A1")) also causes the
same errorExecuting the subroutine on its own (with the absolute range) works OK
So my guess is that it's a bug/limitation with Excel VBA when trying to execute commands from inside a user function
I have list of data with corresponding number of chances ( see attached column E) I need to replicate the data under column A,B,C & D to a new rows as per the number under column E and so goes till the end of the list using a formula.
Basically in the attached example i should have a 43 new data rows
how to setup the original RAG shapes in order to replicate the feature in other s'sheets.
If you drag away from one of the RAG shapes, it takes a copy of the shape but leaves the original shape intact. It seems to be locked in place, but there are no macros or VBA code doing it.
I am trying to NEXT my way through a column of comments and highlight the cells containing the key words. Below is what I have put together, but I know it is NOT working correctly....