Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Code to combine data in cells, explained in detail

Status
Not open for further replies.

sriramus

Technical User
Nov 11, 2005
8
GB
Hi all,

please help me to write a vba code to do the following

i need to a vba code with 1 row and 4 columns for every unique record, with the duplicates deleted(as the data in few row cells is the same) and the data that is different in all the 3 row cells of a column to be merged into a single cell.


below is the example.here each data is equivlent to data in a single cell
the table below is my input to the vba code

sri 29 fruit banana
sri 29 fruit apple
sri 29 fruit gova
mes 30 carrot veg
mes 30 radish veg

the output i want to be is as shown below

sri 29 fruit bananan
apple
gova
mes 30 carrot veg
radish

The row height should be automatically adjusted depending on the number of cells merged/combined


Thankyou.
 


Hi,

This can be accomplished in about 10 seconds using the Pivot Table Wizard via Data/Pivot Table & Pivot Chart Report...


Skip,
[sub]
[glasses] [red]Be Advised![/red]
A wee deranged psychic may be runnin' around out there!
SMALL MEDUIM @ LARGE[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top