# Search:

Type: Posts; User: Michael M; Keyword(s):

Page 1 of 6 1

1. ## Thread: Hide and Show worksheets

by Michael M
Replies
2
Views
50

### Re: Hide and Show worksheets

Greg
Have at a look at this thread.
If you need further help, post back

https://www.mrexcel.com/forum/excel-questions/973802-vba-unhide-sheet-then-re-hide.html
2. ## Thread: If cell is Empty!

by Michael M
Replies
5
Views
101

### Re: If cell is Empty!

OOps sorry....

Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ws As Worksheet
For Each ws In Worksheets
With ws
If .Cells(10, 5).Value = "" Then
...
3. ## Thread: If cell is Empty!

by Michael M
Replies
5
Views
101

### Re: If cell is Empty!

Try

Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ws As Worksheet
For Each ws In Worksheets
With ws
If .Cells(10, 5).Value = "" Then
...
4. ## Thread: VBA: need unique values from a column

by Michael M
Replies
7
Views
186

### Re: VBA: need unique values from a column

Try

Sub MM1()
Range("G2:G" & Cells(Rows.Count, "G").End(xlUp).Row).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=ActiveSheet.Range("H2"), Unique:=True
End Sub
5. ## Thread: why giving me N/A?

by Michael M
Replies
11
Views
259

### Re: why giving me N/A?

N/a is not a zereo !!
If N/a is a possiibility, try

=IF(OR(G8=0,G8="N/a",AB8>=0),0,AB8)
6. ## Thread: Need a VBA Code for select multiple sheets on excel

by Michael M
Replies
6
Views
173

### Re: Need a VBA Code for select multiple sheets on excel

Ok, glad you got it sorted ...:beerchug:
7. ## Thread: Run-time error '1004'

by Michael M
Replies
6
Views
149

### Re: Run-time error '1004'

Does the one further down work ???

For Each con In wkm.Connections

If con.Name = "Query - MONTHLY REPORTING" Then con.Refresh

Next

by Michael M
Replies
4
Views
125

### Re: Formulas

Try

=IF(ISNUMBER(A1),1,0)
9. ## Thread: Don't understand this range reference

by Michael M
Replies
4
Views
145

### Re: Don't understand this range reference

the 1 at the beginning of this section of the formula "forces" the results from, for example, {TRUE,FALSE,TRUE}

1/(\$d\$1:\$d3<>"")

to then having 1 be divided by them, thus forcing them to be...
10. ## Thread: Need a VBA Code for select multiple sheets on excel

by Michael M
Replies
6
Views
173

### Re: Need a VBA Code for select multiple sheets on excel

This will select by Sheet name

Sub MM1()
Sheets("Sheet X").Select
Sheets("Sheet Z").Select (False)
End Sub

And this one by Sheet number
11. ## Thread: Run-time error '1004'

by Michael M
Replies
6
Views
149

### Re: Run-time error '1004'

Is the drive correct AND path EXACTLY the same...still 'C:\Users\John\Desktop\Monthly Reporting'.
you might have to post the entire code !!
12. ## Thread: Display message based on cell value

by Michael M
Replies
9
Views
138

### Re: Display message based on cell value

Maybe this UNTESTED

Private Sub Worksheet_Change(ByVal Target As Range)
Dim A As Range, r As Range
Set A = Range("B3:B16")
If Intersect(Target, A) Is Nothing Then Exit Sub
For Each r In A...
13. ## Thread: Run-time error '1004'

by Michael M
Replies
6
Views
149

### Re: Run-time error '1004'

Sounds more like the file / folder has either been moved, or has been renamed !
14. ## Thread: Import Sheet error

by Michael M
Replies
6
Views
311

### Re: Import Sheet error

When checking the sheet names did you make sure there were no leading / trailling spaces in the sheet name ??
15. ## Thread: Basic Formula to Button

by Michael M
Replies
2
Views
42

### Re: Basic Formula to Button

Do you mean....assuming Range("A1") to be where the formula needs to be placed !

Range("A1").formula="=INDEX(\$F\$6:\$F\$13,MATCH(REPT(""z"",255),\$F\$6:\$F\$13))"
16. ## Thread: Import Sheet error

by Michael M
Replies
6
Views
311

### Re: Import Sheet error

Works fine for me...
Make sure the sheet names are correct AND neither workbook is protected !!

Sub Copy_Frontlog()
Dim sourceworkbook As Workbook, currentworkbook As Workbook
Set...
17. ## Thread: VBA range not recognized

by Michael M
Replies
8
Views
146

### Re: VBA range not recognized

Ok, gotcha......works fine for me, in terms of resorting to Proper case !!
Close and reopen maybe...never actually noticed it before on any of my projects.
18. ## Thread: VBA range not recognized

by Michael M
Replies
8
Views
146

### Re: VBA range not recognized

That won't work anyway....what are you trying to do ??
19. ## Thread: 2013 workbooks don't work in 2016, WHY?

by Michael M
Replies
4
Views
127

### Re: 2013 workbooks don't work in 2016, WHY?

What I meant was did you open the file in 2016, then save it !!
CXan you Upload your file to a sharing site, Dropbox for instance, and then post the link back here ??
20. ## Thread: 2013 workbooks don't work in 2016, WHY?

by Michael M
Replies
4
Views
127

### Re: 2013 workbooks don't work in 2016, WHY?

Have you tried saving the 2013 workbook as a 2016 xlsm workbook ??
What code are you using in the 2013 ?
21. ## Thread: Applying two conditions in formula

by Michael M
Replies
5
Views
223

### Re: Applying two conditions in formula

Maybe this....UNTESTED

=IF(AND(E4="FT",U4>=DATE(2019,2,1),U4<=DATE(2010,10,10)),VLOOKUP(A4,'Test Source'!\$B\$2:\$Y\$200,23,0),0)
22. ## Thread: delete rows based on value in a column cell that is > or equal to 0

by Michael M
Replies
4
Views
110

### Re: delete rows based on value in a column cell that is > or equal to 0

Change this line

For r = lr To 2 Step -1

To

For r = lr To 6 Step -1
23. ## Thread: delete rows based on value in a column cell that is > or equal to 0

by Michael M
Replies
4
Views
110

### Re: delete rows based on value in a column cell that is > or equal to 0

MAybe this

Sub MM1()
Dim lr As Long, r As Long
lr = Cells.Find("*", , xlValues, , xlRows, xlPrevious).Row
For r = lr To 2 Step -1
If Cells(r, "J") >= 0 Then Rows(r).Delete
Next r
End Sub
24. ## Thread: Form from Options--> All commands vs VBA form

by Michael M
Replies
1
Views
67

### Re: Form from Options--> All commands vs VBA form

The "automatic" is quicker / simpler to create, but the order of input is fixed. So it basically is in the column order of input
Whereas a form created by you can input the data in any order....and...
25. ## Thread: How to speedup VBA

by Michael M
Replies
18
Views
558

### Re: How to speedup VBA

Well, my first comment still applies....
Results 1 to 25 of 150
Page 1 of 6 1