Results 1 to 15 of 15

How to loop adding a column with row numbers beside each column in a dynamic range in

Threaded View

Oraekene How to loop adding a column... 09-20-2022, 03:01 PM
alansidman Re: How to loop adding a... 09-20-2022, 05:30 PM
Oraekene Thank you for this. I... 09-20-2022, 05:35 PM
Oraekene Re: How to loop adding a... 09-21-2022, 12:35 PM
mjr veverka Re: How to loop adding a... 09-20-2022, 06:24 PM
Oraekene Re: How to loop adding a... 09-21-2022, 12:48 PM
beyond Excel Re: How to loop adding a... 09-20-2022, 07:24 PM
Oraekene Re: How to loop adding a... 09-21-2022, 12:45 PM
alansidman Re: How to loop adding a... 09-20-2022, 11:13 PM
Oraekene Re: How to loop adding a... 09-21-2022, 12:46 PM
jolivanes Re: How to loop adding a... 09-21-2022, 01:31 AM
Oraekene Re: How to loop adding a... 09-21-2022, 12:54 PM
Oraekene Re: How to loop adding a... 09-24-2022, 06:26 AM
jolivanes Re: How to loop adding a... 09-21-2022, 01:08 PM
beyond Excel Re: How to loop adding a... 09-21-2022, 07:09 PM
  1. #1
    Registered User
    Join Date
    09-20-2022
    Location
    Lagos, Nigeria
    MS-Off Ver
    MS Office 2013
    Posts
    11

    Exclamation How to loop adding a column with row numbers beside each column in a dynamic range in

    Good day. Been on this for more than a week and can't find a solution. New to VBA. I have a data sheet with multiple columns of data. I would like to add, beside each column, a column with the row numbers of each column, and to do this through the range till it hits an empty column. Something like below. My data looks like the first pic. I'd like a VBA that loops through that and turns it into the second pic. I currently use Excel 2013. Would be grateful for any response

    UPDATE: Apologies for posting pictures. I attached the sample workbook with the example sheets as in the pics. First two sheets are the before and after sheets. Then i added 2 more sheets to show how i'll be adding columns to the data sheet over time, so the vba needs to work for a dynamic range. Again, grateful for the responses so far

    UPDATE 24/09/22: this issue is resolved. The codes worked, thank you so much. I have an additional request: summing total for each unique value, in multiple columns. Similar to how to find for eg. sum of total sales for multiple months for a particular product. I have attached a sample sheet to explain. The update sheets are to show how thr input data worksheet would can expand over time, so the code would need to work for a dynamic range. So far working on it i've found i might need a SUMIF INDEX-MATCH array function, but i don't know how to write it. Would be grateful for any help, but the initial request in this thread is solved, grateful
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Oraekene; 09-24-2022 at 07:16 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 04-12-2019, 08:15 PM
  2. [SOLVED] Locating text in a column, then adding numbers from the adjacent column.
    By CertainlyIndecisive in forum Excel Formulas & Functions
    Replies: 29
    Last Post: 01-02-2018, 12:54 PM
  3. Adding sequential numbers to Column A if Column B has text
    By computer12345 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-28-2015, 09:11 AM
  4. Need to define dynamic range for column I to K based on dynamic column A
    By flabb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-19-2015, 10:19 AM
  5. loop through range to copy row if data exists in column, then delete the column
    By wpryan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2015, 05:03 PM
  6. Adding Sequential Numbers in Column B Based on Column A Values
    By habsfan1433 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-14-2014, 04:17 PM
  7. Replies: 12
    Last Post: 09-21-2012, 12:22 PM

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