Use Macro To Increase Cell Content 10 Points

Nov 17, 2007

I don't know if I am asking for something impossible,but is it possible to create a MACRO to automatically add or subtract 10 to whatever number is in the cell? for example:

A1= 20

I would like to have a macro that lets you either add 10 to it to become 30 or subtract 10 to it to become 10.

View 9 Replies


ADVERTISEMENT

Macro To Increase And Decrease Cell Number

Apr 28, 2012

I have a macro that increase a cell number and one that decreases a cell number, heres my code:

Code:
Sub Macro1()
Dim t
t = Split(Worksheets("Sheet1").Range("d5").Text, "/")
t(0) = Format(t(0) + 1, "0")
Worksheets("Sheet1").Range("d5") = Join(t, "/")

[Code] .......

So they do exactly what i want them to do but i want to put a limitation on them, so say the number in the cell is 0 then i dont want it to be able to subtract from it anymore, and say the number is 20 i dont want it to be able to add any more, i tried to put if statments into the code but no luck.

View 3 Replies View Related

Macro Increase Row Value Of Cell Reference By Increments Of 1

May 9, 2012

i'm looking for a loop macro to perform the following task:

Sheet 2 is my look up table, and sheet 1 as a number of references such as:
='Sheet 2'!B1
='Sheet 2'!E1
='Sheet 2'!G1 etc

I need a macro that increases the row references "1" to "2", saves the sheet then increases "2" to "3" and so on until the bottom of the reference table is reached

View 1 Replies View Related

Using Content Of Cell Within A Macro

Feb 25, 2009

I am attempting to use a cell reference generated using the "address" function and text function (so the cell displays text only, not formula) as a means of defining the top left cell into which I want to paste a column of formulas. The reference cell is static, but the contents is dynamic.

View 3 Replies View Related

Run Macro Everytime Cell Content Changes

Jan 15, 2008

I want a macro to run everytime the value in say cell D6 changes.

View 13 Replies View Related

Run Macro Based On Cell Content

Aug 7, 2006

I have a drop down list made from the Forms toolbar with a list of items: 1, 2, 3, 4, 5. I have set it with a linked cell, so when you choose, say 3, from the dropdown, 3 appears in B10.

I was hoping to add a 'Go' button, which would run another macro depending on what is in B10, i.e. so if 3 was chosen, then you press 'Go', Macro3 would be run.

So I have 5 macros called Macro1 - Macro5, and I need some code for the 'Go' button which will run the right macro depending on what number is in cell B10.

View 9 Replies View Related

Read Cell Content & ADD Content + Font Properties *SOLVE

Sep 12, 2007

I use this to read cell content, add some text/characters (ie. [ and ]) and change the properties of the complete cell

Sub COMMENT()
Worksheets("DVD Lijssie").Activate
If ActiveCell.Value 0 Then ' Change all in to ... ... ...
ActiveCell.FormulaR1C1 = ActiveCell.Value & " " & "]" & " " & "["
With ActiveCell.Font
.Name = "Arial Narrow"
.Size = 8
.ColorIndex = 16
End With
End If
End Sub
HOW can I change this vba-code so it leave's the content of the cell like it is and add some content with the use of let's say TexBox1 and ONLY use different font properties for the newely added content?

View 9 Replies View Related

How To Create A Macro To Edit Cell Content

Nov 9, 2007

I'm trying to create a macro which will edit the content of a cell and update. I'm just using the "Record New Macro" option in tools.

It doesn't seem to perform the F2 edit function within the macro.

I'm sure this has been discussed previously, but I can't get the search function to work for me.

View 9 Replies View Related

Macro To Copy Content From Cells Into One Cell

Oct 20, 2008

I have a question.

What code do I need to make the data that is in more cells to be shown as data in one cell ?
ex. A5 D5 to be shown as D2(in a new workbook)
1 1 11

And that for every row?

View 9 Replies View Related

Macro To Delete Specific Cell Content

Apr 24, 2009

I am having some trouble writing a macro to delete cell content. I know which cells I want to clear, but I can't seem to get the macro to do it.

I also want to have something in the macro that inserts data into the lines that I am trying to clear. I want cell A67 to say "Payment" and cell A71 to say "Total."This is the code I am using:
Sub DeleteCell()
Dim i As Integer
For i = 67 To 71
If Range("A" & i).Value = "--" Then
Range("A" & i).Delete
Next i
End Sub

View 9 Replies View Related

AutoFilter Macro Using Cell Content As Criteria

Oct 5, 2006

I was wondering if I could pick up the Field number and the criteria from a cell in excel rather than changing the code in VBA.

Range("A1:K1"). AutoFilter Field:=Range("A1"), Criteria1:=Range("B1")

I was trying this code but I got an error message. Does anyone know if I can pick up these information directly from excel.

View 6 Replies View Related

Simple Macro For Dividing Cell Content By 100 Needed

Dec 14, 2006

I'm only starting to get into the Macro side of excel, and I've created a couple of macros to automatically format cell contents and the like.
However I'm having trouble trying to divide some cell contents by 100.

I have 2 files I'm working with, one contains information regarding cd's and percentages, however the percentages in this file cannot be formatted to percentages (so the powers that be say) for whatever reason.
I copy all this information into another file which does have the percentages formatted as percentages, the result is that the values get multiplied by 100.

So values that read:
100
50
50.25

for example, appear on the new sheet as:
10000%
50000%
5025%

Is it possible to write a macro that will divide these percentages by 100 so the read correctly as:
100%
50%
50.25%

the macro will have to work on selected ranges.

View 9 Replies View Related

Macro For Saving Filename Based On Cell Content

Feb 3, 2009

Is it possible to create a macro attached to a button that allows me to save the workbook based on content of 2 cells in the workbook?

I like to save the workbook based on content of cell A4 that contend a text string. After that saving another time with the contend of cell A4 plus cell A9 which contend the today() function. I am doing this because this workbook is constantly updated and a backup copy is done based on the date the file is save.

View 9 Replies View Related

Change Content Of One Cell Based On Content Of Another

Apr 18, 2014

Formula/macro/etc that would enable me to have content of a cell changed based on the content of another cell in the same row.

Example: cell in column D says "PSA" - so I would need the cell in column H for that same row to read "Radio"

I would need an entire sheet scanned to review for these occurrences and make the appropriate changes. I also would need the formula to be inclusive enough to scan for variations in column D cell content (PSA 1, PSA 2, etc).

View 4 Replies View Related

IF Function Formula Logic: For Every Increase Of Of Mhz, Give 25.00 Per 100 Increase

Nov 2, 2006

I have a test due in the morning, and I really need this question answered ASAP, if anyone could. I need to create an IF formula for this situation: the standard Mhz is 500. Give 55.00 for that standard. But for every increase of of Mhz, give 25.00 per 100 increase.

View 2 Replies View Related

Points Property Select Multiple Points

May 2, 2007

Is there a way of amending the following line of code so that it selects multiple data points in a data series in a chart (e.g points 14,15,16)?

ActiveChart.SeriesCollection(2).Points(14).Select

View 2 Replies View Related

Matrix - Identify Cell Content In Column For Row If Matrix Content True?

Mar 21, 2014

For a table like the one below produced for the sake of example (actual is much much bigger) I want to make it list rows that are true for a certain column for a certain variable in the matrix. So for say water terrain, which types of activity can I do i.e. swimming. Or for Offroad the activites which I can't do i.e. Run and Swim.

ActivityWaterRoadOffroad
Jog nym
Run nyn
Walk nyy
Swim ynn
y=yes
n=no
m=maybe

View 10 Replies View Related

Macro To Increase A Number

Nov 18, 2008

what i need is a macro to run when I print a form. I am making a job card with a unique number on it ie: 100. when I print the form, I then need the 100 to change to 101 and so on. I cant work this one out.

EDIT - Ive attached my work in progress. It is for a computer repair shop. I have a few macros in there as I need to email a copy of the workbook too.

when you open the workbook, you will see the job number in red. I just need a macro tht will increase that number +1 every time it runs. I also need the email macro to rename the workbook to the customer name input in cell B4 - but I think im best to post this request in a new thread?

View 3 Replies View Related

Macro: Increase Row Number Each Month

Dec 6, 2006

I am trying to write a program that needs to select a different cell everytime it is ran. For example, this month when it runs I need it to select cell BL137. Next time it is ran it will need to select cell BL138. Month after BL139. The cell it selects will always be in the same column (column BL) and the cell number always increases by the same amount (1).

View 6 Replies View Related

Macro -Delete Decimal Points & Add 0's

Nov 18, 2008

I am in need of a macro which would be capable of doing the following;

Replacing a sequence of number's & decimals such as 58.6073.1 with 58607310000
Essentially, the code will just need to remove the two decimal points & to suffix those 4 zeros onto the end of the number sequence.

View 3 Replies View Related

Macro To Insert Rows At Different Points

Oct 4, 2007

Column 'A' in my spreadsheet has cells with a number in and blank cells in no particular order. What I need to do is insert a new row above each number but I don't know how to write this as a macro.

View 9 Replies View Related

Macro To Increase Range Of Pivot Table?

May 2, 2013

i have a workbook containing two sheets "Impiorted Data" which is the data which is downloaded and the range will change each time the data is imported and "Pivot Table"

I would like a macro to increase the range of the data from col A to the lasst row in Col K so that the pivot Table has the correct range

I have recorded a macro , but would like this to be streamliined with regard to the range

ActiveSheet.PivotTables("PivotTable3").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"C:My Documents[Debtors.xlsm]Imported Data!R1C1:R2797C11", _
Version:=xlPivotTableVersion14)

View 3 Replies View Related

Macro Excecution On Cells With Variable Refence Points

Jan 21, 2010

I need to tweaking some code. I currently have the following

View 2 Replies View Related

Can I Get One Cell To Increase By 1

Feb 10, 2009

if it is possible to increase one cell by 1 when the date was changed in another cell. I installed the code that was given to me and it worked perfectly, thanks agin JB and royuk, UNTIL the cell that was to increase by 1 was locked and the sheet protected.

The date cell is not locked.

View 10 Replies View Related

Increase Cell Value

Jun 6, 2006

I need to increase the cell value on a spreadshhet that contains over 50,000 cells. I know how to do this on a cell by cell basis. I need to know if there is some way of doing this to multiple cells. Here is my example;

$603
$712
$649

I need to increase each cell value and roundup to the next number. I have been doing the following formula: =ROUNDUP(603/.97,0) to increase the cell value to $622.

View 9 Replies View Related

Increase That Amount By A Percentage Identified In Another Cell And Display The Value Only Without Any Formalas In A New Cell

Jan 19, 2009

If a cell is not blank, then increase that amount by a percentage identified in another cell and display the value only without any formalas in a new cell. To this end I wrote this IF statement:

=IF(I2>0,CP9=(CA9*I2/100)+CA9,CP9="")

Observation: I see a FALSE in CS9 where this IF statement exists, however, CP9 does not display the required value.

View 8 Replies View Related

Increase One Cell By Decreasing Another

Jun 12, 2014

Is it possible to have a cell increased by 1 and another decreasing by 1 in a simple cell formula.

E.g.: I have an inventory stock sheet that is very simple. I have a maximum stock column C, a stock on hand (available) column A and a stock sold column B.

Every time I sell an item and punch it into column B it should automatically decrease the amount in column A by the number that I punch into B.

I am not concerned about the maximum stock column but would like an easy formula just to work out the amount that I have available so I know when to order more stock.

So when I punch in a 5 on B2 it should decrease the value of A2 to 1. And when I purchase stock again and I punch in say a 5 on A2 it should decrease B2 to a 1.

****A* B *C
1 *2 *4 *6
2 *4 *2 *6
3 *8 *6 *14
4 *0 *6 *6

View 3 Replies View Related

Get One Cell To Increase By Digit One

Jan 10, 2009

How can I get one cell to increase by 1 after I change the date in another cell. The spreadsheet is used to keep track of Oxygen Bottles at the local Fire Dept. and I want the " Times Filled" cell to increase by 1 after the " Date Filled" cell is changed. I'm not sure if they key the date in or if they use a calender add-in pop up.

View 5 Replies View Related

Increase Cell Range By 1 Every Day

Jan 28, 2009

I'm trying to sum a range in Column AB that increases by 1 cell every day.

Specifically, Jan 1 will be AB1, Jan 2 will be SUM(AB1+AB2), Jan 3 will be SUM(AB1:AB3)...and so on...Dec 31 will be SUM(AB1:AB367).

If it helps, the dates of the year run from A2:A367.

View 9 Replies View Related

Increase Speed Of Macro: Match In Font Color It Will Fill The Top With Orange And Delete The Bottom

Dec 12, 2006

My macro works fine but I'm interested in seeing if I can speed it up. What I'm doing is starting at the bottom and comparing it with the row above and if they match in font color it will fill the top with orange and delete the bottom. This works but usually takes several minutes.

Public Sub ADMINCompareList()
Dim varTest1, varTest2
Dim lng As Long, i As Integer, iTest As Integer
Application. ScreenUpdating = False
Worksheets("ADMIN").Activate
For lng = ActiveSheet.UsedRange.Rows.Count To 2 Step -1
If Not Range("M" & lng).Font.Color <> Range("M" & lng - 1).Font.Color Then
Goto newrow
End If
varTest1 = Intersect(Range("J:W"), Rows(lng))
varTest2 = Intersect(Range("J:W"), Rows(lng - 1))
For i = 1 To 14....................................

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved