+ Reply to Thread
Results 1 to 3 of 3

Creaing function SUMIF with macro relating to sheeets

  1. #1
    Registered User
    Join Date
    07-24-2014
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    2

    Creaing function SUMIF with macro relating to sheeets

    Hello,
    I wanted to write a macro with function SUMIF, however I'm stack with reference to sheets based on value.

    What is working:

    Cells(12 + TotalRows + 1, 4 + g).Formula = "=SUMIF('400005000'!C1,Main!RC3&Main!R11C,'400005000'!C7)"

    I want however to use instead of '400005000' something like Sheets(j) where "j" is variable (sheet number). I imagine it as something like that (below) however it doesn't work.

    Cells(12 + TotalRows + 1, 4 + g).Formula = "=SUMIF(Sheets(j)!C1,Main!RC3&Main!R11C,Sheets(j)!C7)"

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Creaing function SUMIF with macro relating to sheeets

    Hi Hronic,
    maybe so
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-24-2014
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    2

    Re: Creaing function SUMIF with macro relating to sheeets

    Thank you! it works as i wanted

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IF Function Relating to a Range of Cells
    By jeff17408 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2013, 09:27 AM
  2. Automatic indexing with renaming of sheeets
    By Mearsy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2012, 11:07 AM
  3. Replies: 2
    Last Post: 11-22-2012, 02:09 PM
  4. Put border around cells that contain data (multiple sheeets)
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-15-2011, 04:01 AM
  5. Yes/No Function Relating to Text
    By EI-ALEX in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-18-2009, 08:32 AM

Tags for this Thread

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