Simple Cell Value +1 Macro

Jan 24, 2010

I'm trying to write a basic macro which will increase the value in a cell by 1 when I click on the button I've made. I've searched for hours on the Internet, including this site, and found several websites which give a formula needed but none of them work, I always get an "Object variable not set" error or something about sub-functions which I can't recreate so I can't give the full error message. Sorry.

Based on what I've seen on the Internet, I currently have:

View 14 Replies


ADVERTISEMENT

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

Simple Password To Run Macro

Aug 3, 2007

i need a way for a simple input box to come up and request a single generic password prior to runing a macro

View 9 Replies View Related

Macro To Copy Simple Sum Down The Column?

Jul 4, 2014

I need a macro that can copy a simple formula

I have 2 columns one for the number of items and a column next to it that cumulatively add the totals down the sheet e.g. =E12+G13 etc.

A B
2 2 (=A1)
4 6 (=A1+B2)
1 7
3 10
2 12

If I copy the formula all the way down the page my graph becomes distorted

Is there a macro that will only copy the formula when there is data in the first column and run in the background without needing to be activated

View 2 Replies View Related

Simple Copy Paste Macro

Jun 21, 2007

I have a really large excel file (90 Megs) And i want to copy the values and formats of certain sheets to another workbook. Ive tried using a copy/paste macro i had from work but the sheets have alot of groups and info so it kept freezing

View 9 Replies View Related

Very Simple Macro Not Running Consistently?

Jul 30, 2012

I have two short macros, shown below. The first changes the font color of the cells in named range BackgroundFont1 to the background color of the cells. The second macro turns the font color in these cells back to black.

I call these subs in other macros. The first one works all the time. The second one works only occasionally - more often than not it just hangs up Excel entirely and shuts down the program. It happens even if I just run the BlackFont macro on its own.

The error message I get at times is "Method color of Object Font failed".

Macro 1

Code:
Sub BackgroundFont1()
For Each cell In Range("BackgroundFont1")
cell.Font.Color = cell.Interior.Color
Next cell
End Sub

Macro 2

Code:
Sub BlackFont()
For Each cell In Range("BackgroundFont1")
cell.Font.Color = vbBlack
Next cell
End Sub

These are the cells in the ranged named BackgroundFont1.

Code:
=Demo!$JY$581:$KI$590,Demo!$JY$599:$KI$602,
Demo!$JY$612:$KI$615,Demo!$JY$624:$KI$625,
Demo!$JY$643:$KI$644,Demo!$JY$656:$KI$658,
Demo!$JY$667:$KI$669,Demo!$JY$677:$KI$679,

[Code] ......

View 6 Replies View Related

Simple Macro To Repeat On Next Row On Same Columns

Jan 22, 2014

I've recorded a macro which selects a few cells in a row, copies them and pastes them again over the same cells (special paste - only values), and I've attached this macro to a button.

I would like the macro to repeat the same action on the next row for the same columns, each time the button clicked.

How to update the macro to move to the next row each time initiated?

View 5 Replies View Related

Simple Macro To Group Rows For Form?

May 11, 2014

I am creating a new form, and have 2 option boxes. I have linked these checkboxes to a cell which gives a calculation depending on what is selected (cell E10). If the value of this cell is 2, then the person has selected that they don't need to fill in the details below. If this is the case then I would like to hid the entire rows below (rows 18 - 45 to be precise).

At the moment I have used data validation to blank out these rows, but I'd much rather group them automatically to avoid a large gap between the option boxes and the next section.

View 7 Replies View Related

Create A Simple Macro To Open A Second Workbook?

Jan 31, 2014

I am trying to create a simple macro to open a second workbook if the value in a cell in the current workbook is 'x' or if 'y' do nothing.

Basically I have a simple sales ledger, one column has a yes/no for whether or not an invoice is paid if no I want to open a second workbook 'debtors' so that I can manually input the details. I'm sure this is a very simple proceedure but I can't seem to crack it.

View 2 Replies View Related

Create A Macro From This Simple Search Function

Aug 24, 2009

I am using excel 2007 for database of a large e-commerce site.
I am creating search-able attributes from keywords found in description, title and meta-data columns.

I am using the following function in "column X" to search 4 columns (see formula) for specific music styles.

View 6 Replies View Related

Excel 2010 :: Getting Simple Macro For Paste Value

Oct 21, 2012

Need a simple macro for paste value - it used to work in Excel 2003 but not 2010.

View 1 Replies View Related

Running Simple Macro On Multiple Sheets

Oct 22, 2013

I need to run a very simple macro (filter by date, copy, and paste) on every worksheet in a workbook, and then place that data into a summary page at the "end" of the workbook. Most other posts had to do with some kind of formatting that would work in succession on the sheets linearly from left to right (for lack of a better way to put it). My problem, however, is that the data would need to be pasted into the summary worksheet, and then somehow the macro would come back to the next sheet (after the one it just did) and do it all over again, so on and so forth. The worksheets are arranged alphabetically, but other than that there is no sort of easily identifiable progression between them (i.e. Sheet1, Sheet 2, etc.).

View 9 Replies View Related

Simple Macro- Exporting Data From A Database

Nov 21, 2006

I am exporting data from a database and will want to split up the information into separate worksheets & eventually into separate workbooks.

What I am looking for is a macro code that will automate the cut/paste of information onto other worksheets. I know I can record the macro but the problem is the data sets vary in size each quarter.

What I need is a macro code that looks for a particular phrase and when found it automatically puts all rows undernear (until phrase appears again)on a new worksheet....make sense? The phrase might appear twice or 50 times, so each time it is found the data following will cut/paste.

View 9 Replies View Related

Simple Macro - Copy Result Of Formula

Dec 14, 2009

I am trying to implement a simple macro. Here is my
Function Age(DOB)
Age = Int((Now - DOB) / 365)
End Function

Sub Macro1()
Age (Selection)
ActiveCell.Offset(0, 1).Select
******
End Sub

The function basically calculates the persons age using their date of birth. What I need to know is how to copy the result of the function into the cell next to the selected one. (The code above only selects the adjacent cell).

View 9 Replies View Related

Simple Insert Value Into Cell

Apr 6, 2009

What I would like to do is to insert the text "Agent" into the empty cell A# immediately above the block of names if "Agent" isn't already there. I'm having trouble with the syntax... The cell A# won't always be the same as the position of the block of names varies. In this case it's A9.

View 2 Replies View Related

Simple Auto Populate Cell From Dropdown?

Dec 16, 2013

Every time a name is selected in column C12:C15, I need that respective row to populate with $10 in column J. When column C12:C15 is blank, I need that respective row to read $0 in cloumn J. It's either one (10) or the other (0).

There are rows above and below it as well that have nothing to do with this, so the formula/function would be specific to just this subset of rows (rows 12-15).

I get close, but can't seem to nail this simple formula/function down. I am unable to download any sheets due to my work's firewall.

View 6 Replies View Related

Simple Copy And Update Cell Value Every Minute

Mar 21, 2009

I am trying to grab the value of a cell every time it updates and copy that value and store in a new cell.

So I have a cell (A2) and it updates every 60 seconds, I need that value for t=1 (first time) to be copy and pasted into a new cell (B2). Then when t=2 (second time, 60 seconds later) I need the value to be pasted into the same column but a new row, namely cell C2. Then when t=3 (third time), I need it to be copied to cell D2 and so on.

I'm assuming it just a macro that is called every 60 seconds and grabs the value of A2, but then needs to find the next cell in column B that is empty and paste it there.

View 9 Replies View Related

Simple Cell Addressing Issue Searched Long Time

Mar 16, 2009

I need to ask user to input the row ("rowin") and column ("colin") address in order to activate a cell. The mose natural inputs from the user will be an integer for row and one or two alphbats for column. Say, for example, the user input (82, AY), how do I represent the cell in code? I know I want to say something like Range("AY82"). But I just could not figure out how to concatenate "colin" & "rowin" to make it AY82 to Excel.

View 4 Replies View Related

Simple Ledger

May 30, 2009

This is going to sound very simply to most here I'm sure. I have a need for a simple ledger, credit, debit, balance. I will only have maybe 12 accounts and want to keep track of hand written invoices and payments.

Here's what I would like: I return to my office, click on a tab for an account, enter the date and amount of an invoice in a debit column for that account. When payment is made, enter the amount received in the credit column. Having a running total in the balance column. A monthly statement option would be nice, but not necessary.

I have searched for templates of general ledgers and get results with budgets, projects . . . just too complex for my needs now.

View 11 Replies View Related

VBA Simple Right Function

Mar 31, 2008

Is there any reason why this wouldn't work in Excel 2007 despite working fine in 2003?

.Range("C2:C15132") = Right(.Range("C2:C15132"), 7)

View 9 Replies View Related

Simple IF Function

Aug 18, 2008

If Channel A = Channel B, only fill "Primary Channel" (A or B)

If the Revenue A is bigger than Revenue B then take the Channel A as primary and secondary channel column as Channel B

if the Revenue B is bigger than Revenue A then take the Channel B as primary and Channel A as secondary

Sample File

[url]

View 9 Replies View Related

Simple Loop To Get Value

Sep 27, 2008


I just like to do a simple loop but canīt seam to work it out.

I like to loop through column F and on the last cell or the first empty cell I like to get the sum.

how that works? I only find samples which donīt seam to help me much.

Also I would like to know a code to select all cells and rows and copy it into a different worksheet. Like cut and paste with vba.

View 9 Replies View Related

Simple Nested IF Statement

Mar 7, 2014

I am trying to do a nested IF statement in which if Cell A has a number, display it. If Cell A = "", look in Cell B. If Cell B has a number, display it but if its "", then display Cell C.

I have the IF statement working for the first two pieces but don't know how to incorporate a third statement: =IF(A="",B,A)

This works - how do I get it to check Cell B and show Cell C if B is empty?

View 2 Replies View Related

Simple Counting Cells

Mar 5, 2009

way to count cells in a spreadsheet (not values in the cells but just the cells themselves). So I have a whole bunch of cells, some are red, some are blue, some are green based on the info i have to keep track of.

so can i write some COUNTIF for red cells green cells, etc

View 14 Replies View Related

Inputbox For Simple Verification

Jun 3, 2008

I have a VBA userform with various textbox fields like 'Name' and 'Address' and 'Amount'
I would like an input box to pop up that asks the user to 're-enter for verification'
So that they have to type the same thing twice, to protect against typos

How do I code it so the program compares the inputbox to the textbox and passes only if they are identical?

(or even, using two inputboxes instead if that would be easier)

View 13 Replies View Related

Add Condition To Simple Formula

Mar 26, 2009

Using Excel 2003. I have a very basic SUM formula I am using to show how many forms are still in-house. Pretty simple.

Column D is how many came in.
Column F is how many were completed.
Column E is what is left.

To get the daily count I take the previous day's Column E, add to today's Column D and subtract today's Column F.

=(E2+D3-F3)
Puts the results in E3.

This formula is copied on down the worksheet which results in:
=(E3+D4-F4), with the results in E4. And so on down Column E.

The problem is that if there is no data entered in Column D or F, the results from E are carried (copied?) as far down as the forumla. i.e., if today's column E results in 4, then that is displayed for as far down as I have copied the formula. What I'd like to do is set the formula so that if there is no data in columns E or F, then there is nothing displayed in Column E.

View 3 Replies View Related

Simple Private Sub Not Working?

May 7, 2012

Here is my simple Private Sub that I can't get to work,

Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Target

[Code]....

I have a checkbox control that changes the value to "True" or "False" in column 4. Here lies the issue, if I use the check box control to change the value, the private sub does not work. If i type the value of "True" or "False" where the check box control stores its value, the private sub works. I would like to see if there is way to get the private sub to work by simply clicking on the check box control only.

View 9 Replies View Related

Simple If Array Formula

Mar 10, 2013

Trying to work out array formula.

basically if B2 = list of figures in range(F1:f22) then "G14" otherwise "".

{=if(b2=(F1:F22),"G14","")}

doesn't work.

View 5 Replies View Related

How To Do Simple Table Lookup

Jun 23, 2013

How to do simple table lookup. I have a table showing #of colors being used for screen printing down one side and qty of shirts ordered going across the top. I would like a formula that when I enter the # of colors and the quantity of shirts it will return the correct price.

12-35
36-71
72-143

1
1.50
1.25
.90

2
2.00
1.50
1.10

3
2.75
1.75
1.30

View 2 Replies View Related

Sum Of Simple Validation Results

Mar 26, 2014

Cell A1:A10 has a simple validation dropdown list of "Yes", "No", and "NA". Cell B1 has "if" formula if Yes selected in A1 then "1" is the result in cell B1, if no selected then 0 in B1 if NA selected then NA in B1. What is the formula to sum B1:B10, calculating the 1's and ignoring the "NA's"? I tried subtotal, sumif, etc.

View 2 Replies View Related







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