Detect a different cell and split the data to another sheet

excelthong

Active Member
Joined
Jul 13, 2006
Messages
313
Hi Forumate

thank you for your help and hope some expert can guide me here.

I have a list of data from A1 to AE3548
however the algorithm is simple, there is a time difference in column C,
which mean
C1 :C14 = 2:20 and
C14:C20 = 2:30,
C21:C27 = 3:00 etc
column B is date

may i know how can i copy the data and split the sheet like
when C14 and C15 is different, copy A15to AE15 to a new sheet
when C20 and C21 is different, trigger and copy A20 to AE20 to new sheet?
and use the date in column B to name the sheet in the order like 200327-1 etc?

thank you for the helps
thong
 
Hi again excelthong. You will find it easier to code, debug, and maintain your VBA, if you create smaller pieces of code. So, rather than insert the code for what you hope to do into SplitData, code a new sub to do just the work that you've outlined. Once you have it working, if you need to, you can call it from SplitData so in that way its functionality becomes part of how SplitData works, or you can just run it separately. It gives you choices, which coding it as part of SplitData won't.

Doing this, you can build up a library of code to do some really useful things, which will make your next project faster to code, and the one after faster still, and so on.

And if you get stuck on anything, the Message Board regulars are here to help. Most problems you will encounter have already been solved, so the answer is usually quick in coming.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
thanks again for your advise @CephasOz

again as i said before splitdata already save me tons of hours - i really appreciate it,

certainly understand the advise that you gave me. i cant do coding thus i learnt everything from recording a macro and start from there.
was learning vlookup indirect function from youtube and make the sheets easier to operate
Just very slow in VBA and most of the time i know the algorithm - but just cant make it as code

was busy last week and this week will have more time to look into this area
again thank you very much for your guidance so far !! appreciate it !
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,666
Members
449,114
Latest member
aides

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