+ Reply to Thread
Results 1 to 3 of 3

Countif formula for n number of rows and columns in macros vba

Hybrid View

araffi2011 Countif formula for n number... 08-01-2013, 03:54 AM
:) Sixthsense :) Re: Countif formula for n... 08-01-2013, 03:58 AM
araffi2011 Re: Countif formula for n... 08-01-2013, 05:37 AM
  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    2

    Countif formula for n number of rows and columns in macros vba

    hi ,

    currently i am working n a excel sheet , i need to include an countif formula column after the last column. and the formula should be pasted till the last value in the row.

    ex: if three columns are there then count if column should be inserted in d column. Columns counts are varying and also rows count. Countif function to sum the "X" count .

    A B C Count if
    1 a x 1
    2 x x 2
    x x x 3

    The number of rows are varying. In some some sheets more rows are coming. i am unable to write the macros.

    Kindly help me.
    Last edited by araffi2011; 08-01-2013 at 03:59 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Countif formula for n number of rows and columns in macros vba

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    08-01-2013
    Location
    chennai
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Countif formula for n number of rows and columns in macros vba

    BEFORE

    A B C
    1 0 0
    0 1 0
    0 0 1
    1 1 1

    AFTER
    A B C Countif
    1 0 0 1
    0 1 0 1
    0 0 1 1
    1 1 1 3

    I am calculating the number of 1's across the rows. If the sheet as 3 columns , i want to add 4th column with countif formula. What challenge i am facing is the column count and row count is not constant, they are varying .

+ 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. [SOLVED] Enter a sum formula in each of an unknown number of rows - macros
    By ahilty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2013, 04:07 PM
  2. Replies: 1
    Last Post: 03-28-2013, 01:48 PM
  3. [SOLVED] COUNTIF last number of rows =formula
    By JTM1200 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-10-2012, 07:03 PM
  4. Autofilling a formula a defined number of columns and rows.
    By JohnnyBGood in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2010, 06:11 AM
  5. Replies: 0
    Last Post: 01-05-2005, 09:31 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