# Posts by aysam

• ## SUMIF with dates

Hi all
I'm doing a formula using SUMIF
When the criteria in the formula is a date, it returns 0 Why ? I don't know
My formula is
Code:
=SUMIF(DEBTS!\$A\$5:\$C\$150;D2;DEBTS!\$C\$5:\$C\$150)

D2 is a cell that have a date
this formula results 0 value
even though it returns correct values if D2 is not a date
Hope I'm clear enough
using office Excel 2003
waiting

• ## Run a macro in three or more sheets at the same time

Re: Run a macro in three or more sheets at the same time

Greatly appreciated:thumbcoo:

• ## Run a macro in three or more sheets at the same time

Re: Run a macro in three or more sheets at the same time

Hi Roy
Thanks for the follow.
Here is my sample workbook.
I need the code to add rows work in the five worksheet at the same time using one button click.
the largest copy range is to be used.("A12:GG12")
Hope I'm clear enough.
Seems a problem in the forum attachment So here's a link

• ## Run a macro in three or more sheets at the same time

Re: Run a macro in three or more sheets at the same time

I amended the array as required
but it still copies and pastes in only one sheet ;the active sheet

• ## Run a macro in three or more sheets at the same time

Re: Run a macro in three or more sheets at the same time

up

• ## Run a macro in three or more sheets at the same time

Re: Run a macro in three or more sheets at the same time

Quote from Barb-B;648045

Or, if you want to work only with some sheets in your workbook, and not others you could do something like this:

Code
``````For Each sht in Array(Sheets("Sheet1"), Sheets("Sheet3"), Sheets("fubar"))
sht.Range("a1") = "Put something here"
Next sht``````

Hi Barb_B
thanks for your try to help
But
it Pops out a run time error 92
for loop not initialized
and yellow highlights >>> next sht

• ## Run a macro in three or more sheets at the same time

Re: Run a macro in three or more sheets at the same time

I should try it and back

• ## Run a macro in three or more sheets at the same time

Hi all I have a piece of code
I want it to run in three sheets in my workbook at the same time
I searched the forum and tried a lot but I couldn't do it
Is there anyone could help ?
Of course there are many
My code is

• ## Display Error Message if Password to Unlock Workbook is Incorrect

I have got this code from here
The code is to password protect and unprotect a workbook in one go.
When I enter a wrong password it gives an error message
I want it to show a vba mesaage " Wrong Password " and go on.
the code is :

• ## Exclude specific weekday from list when filling down

Peace to you all
I need a formula to execlude FRIDAYS from a serious of dates
I mean
to put a start date and copy it down without the Fridays
1/7/2010------------Thursday
3/7/2010------------Saturday
4/7/2010------------Sunday
5/7/2010------------Monday
6/7/2010------------Tuesday
7/7/2010------------Wednesday
8/7/2010------------Thursday
10/7/2010-----------Saturday

• ## .Find with MatchCase True and LookAt Whole Argument

Re: .Find with MatchCase True and LookAt Whole Argument

Thanks so much
That was great

• ## .Find with MatchCase True and LookAt Whole Argument

Peace to you all
I have a code that looks for a number in a column
The numbers in the column are not in the correct order
332
256
147
33
158
70

Code
``````Private Sub CommandButton1_Click()
On Error GoTo 100
Dim d
Dim ra As Range
[COLOR=red]Columns(2).Find(C, MatchCase:=True).Activate[/COLOR]
A = MsgBox("Do you want to delete the data", 4)
If A = 6 Then ActiveCell.EntireRow.Delete
Exit Sub
100 MsgBox ("Error")
End Sub``````

the problem is
if I want to look for number ( 33 ) the code activates (332 )the first number that has 33
Any help 'd be greatly appreciated

• ## Use animated gif image in a user form

Re: Use animated gif image in a user form

I'll ll go there but if I needed help , SURE I'll be back.
See you then.

• ## Use animated gif image in a user form

Peace to you all
Is there a way to insert a gif animated picture on a user form and keep it moving then ?
I hope it could be done

• ## VBA macro simple adjust

Hi PCI
I tried your code but it selects the first Cell after the inserted rows
But it helped me greatly to acheive my goal which is
to select the first cell of the inserted rows
I added this piece to yours

Code
``ActiveCell.Offset(vRows - vRows + 1, 0).Select``

OR

Code
``ActiveCell.Offset(1, 0).Select``

Once again thanks soooooo much

• ## VBA macro simple adjust

Peace to you all
I have a macro to insert blank rows after the active cell . ("B6")
for example
It's OK
What I need is
to make the active cell after the insert to be
the first cell after the first active cell ("B7")
my macro is

• ## VBA Code For Variable Print Preview

Peace to you all
I already have a code to printpreview multiple ranges

It printpreviews only the first Range ( C )
I need it to print previews Ranges ( C ) and ( D ) or more in one page
I hope I'm clear enough
Any help'd be highly appreciated