VBA loop that moves data based on conditions

MRDecarte

New Member
Joined
May 24, 2014
Messages
20
Hello everyone,

I look for a code that can help me to set up a report and move the data based on conditions:

IF the first data string is different from 2018 in Column A and/or B that string of data should be cut and pasted in the last column above that very line. So every time the expression is different from "2018" than the number and text string should be pasted in the last column above.


[TABLE="class: cms_table, width: 192"]
<tbody></tbody>[/TABLE]


[TABLE="width: 576"]
<colgroup><col span="9"></colgroup><tbody>[TR]
[TD="colspan: 9"]2018, 1, 90712, 10024405, G6, Snr HR Assistant (HQ), CHE, BIREAUD, Diana, 10012792, 10000.5[/TD]
[/TR]
[TR]
[TD="colspan: 9"]2018, 1, 90712, 10022552, P3, PSFR Officer (Switzerland), CHE, DAVIES,Jane, 10033382, 10000.72[/TD]
[/TR]
[TR]
[TD="colspan: 8"]2018, 1, 90712, 10020882, P4, Head of Global Comm Desk (NY), CHE, GHEDINI,Jon,[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 2"]10006723, 10000.64[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 9"]2018, 1, 90712, 10012632, P4, Snr Prjt Dvlpt Officer (PSFR), CHE, KEITH,Eleanora, ​10006729, 100056.44

I can send an attached xls file if necessary

Best
Anthony[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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