Ask Experts Questions for FREE Help !
Ask
    dragster1090's Avatar
    dragster1090 Posts: 24, Reputation: 1
    New Member
     
    #1

    Mar 15, 2013, 12:14 PM
    excel macro for +1
    I need to create a macro or formula for excel. I have a number in cell A2 and a information in cell B2. I need to create a macro or use a formula that when I enter information in cell C3 that will auto populate cell B3 with a number that is +1 from cell B2. For clarity, please see below:


    CELL CELL
    A = 1234 B = 650-0001
    row 2 = # needed C = 650-0002
    row 3 = # needed C= 650-0003
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Mar 15, 2013, 10:39 PM
    1) Highlight column B and press CTR-1 to open the Format cell window

    2) Apply a Custom format of 000-0000

    3) Now enter this number in B2: 6500001 (notice the dash is missing when you type it)

    4) B2 will now show in the format you noted: 650-0001

    5) In B3, enter the following formula:

    =IF(A3<>"", B2+1, "")

    6) Copy B3 downward



    If I have misconstrued the actual cells where you need things, just wrap your head around the cell format trick and the formula trick, and apply that to where you DO need it.
    ComputerExpert1's Avatar
    ComputerExpert1 Posts: 24, Reputation: 3
    New Member
     
    #3

    Mar 16, 2013, 06:03 AM
    Click the cell in which you want to enter the formula.
    In the formula bar Formula bar, type = (equal sign).
    Do one of the following:
    Cell reference To create a reference, select a cell or range of cells on the same worksheet.

    Cell references and the borders around the corresponding cells are color-coded to make it easier to work with them.

    Range Finder color-codes precedent cells
    Callout 1 The first cell reference is B3, the color is blue, and the cell range has a blue border with square corners.
    Callout to the second cell reference is C3, the color is green, and the cell range has a green border with square corners.

    You can drag the border of the cell selection to move the selection, or drag the corner of the border to expand the selection.

    Defined name To create a reference to a defined name, do one of the following:
    Type the name.
    Press F3, select the name in the Paste name box, and then click OK.

    Note If there is no square corner on a color-coded border, the reference is to a named range.

    Do one of the following:
    If you are creating a reference in a single cell, press ENTER.
    If you are creating a reference in an array formula, press CTRL+SHIFT+ENTER.

    added a photo of what this formula should look like
    Attached Images
     

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

I am looking for a formula or a macro for excel. [ 0 Answers ]

I am looking for a macro for excel. I have thousands of cells in one column to populate. See below: (Cell B4 - thousands of more rows.) I have the following list, I need either a formula or a macro to fill the cell in column B when info is placed in column C. I need the info to follow the...

While Macro Excel 2007 [ 1 Answers ]

Hello! I would like to have some help in this: - I have one column with Date, most of them sequencial, but some are duplicates Like this: 2010-12-23 | -120$ 2010-12-24 | +100$

Excel Macro [ 13 Answers ]

I have some code that loops through a row and a column and compares data. When it finds the values being equal it copies the columns the row is in and pastes it on another sheet along with the previous value of the column. For Each CCell In Range("C2:C65418") If Not IsEmpty(CCell.Value)...

Excel macro [ 4 Answers ]

I need to run a macro that opens excel so I can kick off "application.ontime" basically my macro should run without me having to start excel, just have the computer and outlook running. Is that possible?

Recording a macro in Excel [ 2 Answers ]

Need a macro that will select the cell one place to the left, edit the content, hit enter, and then move to cell below where started and repeat to end of column (last cell with a value). Example: 123-456789 is format of cell to be edited - need to remove the hyphen. Someone had created it...


View more questions Search