Excel 2013 Macro Check cell for content then run another Macro or repeat same macro.

ThomasArthur

New Member
Joined
Oct 28, 2006
Messages
18
Hi
Just starting with VBA macros.
here is the part I'm having trouble with
============================
Sub SplitCust()
'
' SplitCust Macro
'

'
Windows("CDR Usage.xlsx").Activate
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Selection.End(xlDown).Select
Here is where I need to check if 2 cells down is blank or not blank, if blank run another macro,
if not finish down to Application.CutCopyMode = False line then loop back to Selection.Copy line above
Selection.End(xlDown).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
=============================
Any and All help appreciated.
Tom
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I think it would be better if you explained to us what your end goal is.
Running the same script over and over can be done but this is not the best way to do it.
 
Upvote 0
Hi
I have telephone call charge data pulled from a data base.
This is various rows each extract.
I use Sort to have the data in the Customer order.
I then use Sub-Total to to have total for each customer.
There is also a blank cell between each customer because of the sub-total.
I then want to insert the headings to the first line after the blank.
But I want to stop and go to the next macro if the second cell down is also blank.
the next macro copies each customer to a new sheet.
Then using sub-total on each splits up the local, mobile, international, etc calls.

Does that explain OK.
Let me know if more required.
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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