+ Reply to Thread
Results 1 to 9 of 9

Add formula to multible cells !

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Kiruna
    Posts
    163

    Add formula to multible cells !

    Hi this one feels it should be easy but im going cracy here.

    I have a overview page and when i press a button i want formulas to be added to specific cell.
    Im using this code to add the formula to the cell:
    Please Login or Register  to view this content.
    When i press the button i want the code to add it to Range A1:A1000
    and to save me some time i wonder if its any way to add it directly to the range and not like this:
    Please Login or Register  to view this content.
    I know how to add the formula to a range of cells but in this case the range in the formula has to change
    as above.

    Petter
    Last edited by Petter120; 03-05-2012 at 06:44 PM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Add formula to multible cells !

    try this
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Kiruna
    Posts
    163

    Re: Add formula to multible cells !

    It works perfect A follow up question is there anyway to get the code above to only add the formula if there is a value in the cell on sheet2.

    Lets say only if theres a value in Sheet2 A1:A10 it feels unnecessary to copy the formula to 1000 row ?

    Petter

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Add formula to multible cells !

    Could you send the small sample of wokrbook?

  5. #5
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Kiruna
    Posts
    163

    Re: Add formula to multible cells !

    Yes here it comes, i think you get what i mean !

    test10.xlsm

    Petter

  6. #6
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Add formula to multible cells !

    So this should be ok
    Please Login or Register  to view this content.

  7. #7
    Banned User!
    Join Date
    06-13-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Add formula to multible cells !

    In Tom's 4th line
    even these will work

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Last edited by royUK; 04-08-2012 at 03:47 AM.

  8. #8
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Kiruna
    Posts
    163

    Re: Add formula to multible cells !

    Thanks Tom and actuary.jk everyone works fine

    Petter

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Add formula to multible cells !

    I'd prefer:
    Please Login or Register  to view this content.



+ 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