+ Reply to Thread
Results 1 to 3 of 3

Column adding extra numbers!

  1. #1
    Registered User
    Join Date
    03-07-2017
    Location
    Texas
    MS-Off Ver
    Office 2016
    Posts
    39

    Column adding extra numbers!

    How's everyone doing? I was hoping to get some help from you VB gurus.

    I have some VBA code that scans columns to the right every 3 columns. If a value is in the column, it should add a number to a new column (G:G). So, if there are 12 columns, with a number in 4 of them, G:G would display "1, 2, 3, 4."

    There's just one thing that's bugging me. if there are less than 13 columns, it will throw 13 in as well. So, if there are only 12 columns (with data in 3 of the columns), you end up with "1, 2, 3, 13" when it should only be "1, 2, 3."

    I'm a pretty big VBA noob, so any help would be greatly appreciated. Thank you. Here's my code:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Column adding extra numbers!

    You have not provided enough information to be able to help you.

    This is a guess at what you might need:

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 10-10-2020 at 10:23 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    03-07-2017
    Location
    Texas
    MS-Off Ver
    Office 2016
    Posts
    39

    Re: Column adding extra numbers!

    My apologies. Here's the whole sub. I see the issue though. I just don't know how to fix it. When there are not 13 columns of data (with numbers), it pulls in the next column, even if it's just text. Is there a way to only count it if it's a number? Thank you.

    For example if there's 12 rows of data (with numbers), but it's followed by another 13th row of text, it's counting it as 13.

    Please Login or Register  to view this content.
    Last edited by cluelessdood; 10-11-2020 at 04:16 PM.

+ 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] excel is adding extra numbers in the 16 decimals when summing
    By ashweiki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-20-2019, 05:09 AM
  2. [SOLVED] Adding an extra column in a 2D array
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2014, 07:27 AM
  3. Adding an extra column to a pivot table.
    By hello its dean in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-18-2013, 06:05 PM
  4. [SOLVED] adding target lines into graphs without adding an extra column of data
    By ea223 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-16-2013, 12:32 PM
  5. Conversion of days into numbers and adding extra columns
    By nynamyna in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 10:07 AM
  6. [SOLVED] adding extra text into an existing column
    By Zach in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  7. adding extra text into an existing column
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 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