vbanewuser
New Member
- Joined
- Apr 20, 2018
- Messages
- 3
I'm trying to extract specific fields from multiple sheets in to one sheet. Each sheet has multiple rows with row heading as ID, name, total costs, total revenue. I need to find the rows that have these headings. Then the value for each one is listed in different columns - like ID value is listed in Column C, name in column C again, total costs in column G and total revenue in column J. Macro I've just copies and pastes all rows with these values. but I was looking for values to updated in columns set as ID, name, total costs, total revenue in summary sheet and pasting all values from multiple sheets to this sheet under these column headers.
Here is the sample of data in multiple sheets with total costs and total revenue in different row counts. Columns for values in each field is constant, so column B in below table will be used to extract ID and name details, Column to extract total costs and column I to extract total revenue value.
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]123
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name
[/TD]
[TD]abcd
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]cost 1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]123
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]cost 2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]3456
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Costs
[/TD]
[TD][/TD]
[TD][/TD]
[TD]100000
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Cost adjustment
[/TD]
[TD][/TD]
[TD][/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total revenue
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]300000
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here is what I am looking for in summary sheet:
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]ID
[/TD]
[TD]Name
[/TD]
[TD]Total Costs
[/TD]
[TD]Total Revenue
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]abcd
[/TD]
[TD]100000
[/TD]
[TD]300000
[/TD]
[/TR]
[TR]
[TD]456 (from next sheet)
[/TD]
[TD]efgh (from next sheet)
[/TD]
[TD]150000 (from next sheet)
[/TD]
[TD]400000 (from next sheet)
[/TD]
[/TR]
</tbody>[/TABLE]
Please help.
Thank you.
Here is the sample of data in multiple sheets with total costs and total revenue in different row counts. Columns for values in each field is constant, so column B in below table will be used to extract ID and name details, Column to extract total costs and column I to extract total revenue value.
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]123
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name
[/TD]
[TD]abcd
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]cost 1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]123
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]cost 2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]3456
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Costs
[/TD]
[TD][/TD]
[TD][/TD]
[TD]100000
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Cost adjustment
[/TD]
[TD][/TD]
[TD][/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total revenue
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]300000
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here is what I am looking for in summary sheet:
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]ID
[/TD]
[TD]Name
[/TD]
[TD]Total Costs
[/TD]
[TD]Total Revenue
[/TD]
[/TR]
[TR]
[TD]123
[/TD]
[TD]abcd
[/TD]
[TD]100000
[/TD]
[TD]300000
[/TD]
[/TR]
[TR]
[TD]456 (from next sheet)
[/TD]
[TD]efgh (from next sheet)
[/TD]
[TD]150000 (from next sheet)
[/TD]
[TD]400000 (from next sheet)
[/TD]
[/TR]
</tbody>[/TABLE]
Please help.
Thank you.