+ Reply to Thread
Results 1 to 5 of 5

Newbie trying to learn to automate with generic all purpose functions

  1. #1
    Registered User
    Join Date
    10-18-2011
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    1

    Newbie trying to learn to automate with generic all purpose functions

    I have been using excel for YEARS, but only at a very low level. Recently learned that with formulae and this VBA thing (yes, the VBA THING. I am THAT inexperienced) I could do more. So now I'm trying to learn.

    I set up a column of numbers in A, let's say A1 = 1, A2 = 2, A3 = 3, A4 = 4 etc.
    I want a GENERIC function to put in B's columns that will look left one column and add 10 to these numbers. How do I do that?

    At first I would have set B1 to: "= A1+10"

    But the A1 specification is bugging me. Is there a way to tell excel, wherever you are now, look one column over to the left and report THAT number and add 10 to it.

    I tried with = OFFSET(A1, 0,0,1,1) + 10

    But once again I need to specify the A1, and then A2, or change my offset values as I go down the chain.

    Is there a way to do it generically so that I can copy a formula once and put it in each cell and get my desired result?

    I'm sure experienced folk know how to get these results and I'm alos sure it's been posted here on the forums I am just so new to the nomenclature that I cannot find it with searches. Can anyone please point me in the right direction?

    Thanks

    ACC

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Newbie trying to learn to automate with generic all purpose functions

    b1=a1+10
    drag the formula down and it will change to a2+10 and so on
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Newbie trying to learn to automate with generic all purpose functions

    I think you need

    =OFFSET(A1,0,10) & drag down,

    You don't need VBA
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Newbie trying to learn to automate with generic all purpose functions

    Excel supports relative references for formula, if it's just specifying a base cell that bothers you.

    If you look in the formula option there's a tick box for "R1C1 Formula". If you tick that then Excel will replace your coluimn letters with numbers and you can now put in the formula =RC[-1]+10 which means take the value of the cell on this row and one column to the left of this one and add 10 to it.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Newbie trying to learn to automate with generic all purpose functions

    I read the offset as 10, but looks like it should be 1

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1