Hello,
Is it possible to add a row between every record, that has different data for 2 columns ( compared to the row below ) ?
Thanks,
Risto
Hello,
Is it possible to add a row between every record, that has different data for 2 columns ( compared to the row below ) ?
Thanks,
Risto
Post an example of the data with reference to the columns etc
VBA Noob
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
The 2 columns are a little confusing, this will insert rows between different data in column A
Please Login or Register to view this content.
Thanks for the help
I attached the sample file. I would like to insert a row between records, only if columns Name & Phone have different data. If Name & Phone have the same data, no row is added.
Risto
i guess i can just execute the code twice for different columns, it should do the trick.
But is it possible to add data to these empty rows ? data from one row below, for example column A, B & C.
Thanks,
Risto
Someone might take a look at you add an excel file. After all it is an excel forum!
VBA Noob
excel file attached
Which 2 columns. Give as much detail as possible
VBA Noob
columns A & E.
And then if i have these empty rows, is it possible to copy data to these rows from one row below ? For example data from columns A, B & C to the empty rows.
Thanks for the help.
Risto
Last edited by RistoP; 12-15-2008 at 12:43 PM.
anyone can help me ?
Hi
1) Based on your example file
However, in that file there are no test examples where column A is the same, but column E is different. Also, is this data meant to be sorted beforehand.Please Login or Register to view this content.
2) And on your previous post, what empty rows are you trying to fill? After the inserted row? Or for some missing items in the starting data?
As VBA Noob said - give as much detail as possible.
rylo
my mistake, forgot to change column E, so it would be different. But i tried your code and it worked perfectly. All empty rows were populated correctly
Im not sure what you ment by sorted beforehand
And yes, im trying to fill the inserted empty rows, with the data from one row below and from columns A, B & C
Thank You for the help
Hi
For the fill question, can you either adjust your existing example file, or put up a new file that will match your question and show exactly what you want the completed output to look like.
rylo
ok, i have attached 3 files:
sample.xls - this is the original file.
sample-with-empty-rows.xls - this is the file, where the script is executed & the empty rows are created.
sample-final.xls - this is the final file, the way it should be in the end. The 3 columns ( A, B, C ) from the below row, is copied to the empty rows.
Thank You,
Risto
Risto
Try this
ryloPlease Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks