VBA / Macros question; Help pls

jevsim

New Member
Joined
Oct 10, 2017
Messages
2
Dear Friends,

Please help me to solve the following task:

DataTable

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[TD]K[/TD]
[/TR]
[TR]
[TD]SomeName[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD][/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SomeName[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]MyCell[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SomeName a[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD]?[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[TD]12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SomeName[/TD]
[TD]xyz[/TD]
[TD][/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[TD]52[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[TD]85[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SomeName Z[/TD]
[TD][/TD]
[TD][/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]145[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

The key goal is copy the data (Red figures from Column I) to the respective column and rows in the D column ("?" sign cells).
Key issue: there might be more additional rows inserted or deleted before and after My KeyCells (so we cannot fix the code around these cells as they are dynamic)

My suggestion:
Create VBA Macros to perform following actions:

  1. Find the cell named "XYZ"
  2. Assign a name to this Cell - MyCell
  3. Find the range of the targeted cells -(MyCell (+1, +X) (input data)
  4. Find the range of the targeted cells -(MyCell (+1, +Z) (data to be Copied there - TaRGET LOcation)
  5. Copy-Paste as Values from INPUT DATA to TARGET LOCATION


Message bOX - "Done"

Problem: cannot code this idea. Any ideas, Friends?

Or what is your suggestion?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top