+ Reply to Thread
Results 1 to 2 of 2

find a word in a column, identify the row, insert needed rows to make constant

  1. #1
    Registered User
    Join Date
    08-07-2020
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    3

    find a word in a column, identify the row, insert needed rows to make constant

    Hello,

    I am trying to write a macro that formats a report. I have successfully written the macro however it's the report that throws my macro off because depending on how many parameters I use to generate the report it will start the data on a different row. For example if I use 6 parameters it might start the data on row 19. If i use 8 it might start it on row 22. The reason is the parameters are written above the data on the report and so the more I have the more rows it adds.

    The report however always has the same headers above the data. As an example in column B at the top of the data it will always say Source.

    What I want to do is find the first instance of the word "source" in column B. Identify what row that is (say row 19). Then insert a bunch of rows directly above it until Source is on row 30. I know for sure I would never use enough parameters that the data would start after row 30. So by forcing the inserted rows to get it source to row 30 every time, the remaining of my macro can be trained to assume the data always starts on row 30.


    I would love your help!.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: find a word in a column, identify the row, insert needed rows to make constant

    Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] need code to find a word in a column make that numbered row the new variable.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2015, 03:54 PM
  2. Macro Needed for contains word in column a insert mark in column b
    By melisaball in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-09-2015, 10:45 AM
  3. [SOLVED] Find Particular word then insert new entire column before cell.
    By abhinavbinkar in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 01-31-2014, 02:25 AM
  4. Find 1st unique Value on Column and Insert certain Word on cell on left Column
    By Wldlife23 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2013, 10:02 AM
  5. Find word in Column-cut row-insert into new sheet
    By Vrlac8 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 03:28 PM
  6. [SOLVED] Find word then insert 2 rows
    By stryder1587 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-10-2012, 03:38 AM
  7. Make column headers constant in formula
    By cdiaz in forum Excel General
    Replies: 3
    Last Post: 06-28-2011, 03:05 PM

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