Rearrange data - vba-tables or VBA?

regresss

Board Regular
Joined
May 20, 2015
Messages
68
Hi,

I am not sure if this can be done with formulas and Excel tables, or whether I should try something in VBA. What do you think? I need help from design point of view, what do you think should be utilized.


Excel_problem.jpg


for each id in input table
numRows = countif frequency rows + nonempty cells within matrix with valuesT
copy id numRows-times
...
Seems not efficient. What about

For i = 4 to 8
For j = 13 to N
Cells(j,2).Value = Cells(I,2).Value 'I would need to stop the macro when empty
If Cells(j,3).Value <> "" Then Cells(i,j).value = "Frequency" End if
If Cells(j,4).Value <> "" Then Cells(i,3).value = Cells(j,3).value =End if

...

Hm, I think I should firstly take care of the first two columns and only then start populating values
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,215,078
Messages
6,122,996
Members
449,093
Latest member
masterms

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