Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

# Excel Macro Codes and Formulae

### #1 codestrung Posted 28 June 2005 - 04:30 AM

codestrung

New Member

• Member
• 1 posts
Hello.

I am recording some macros but require some assistance where the macro requires some alterations for "Find" where it cannot be recorded.

The code will appear as shown below to Find "Test" when recorded.

Cells.Find(What:="Test", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True). _
Activate

Selection.Offset(0, 1).Select '*Right*

End Sub
'
What would the code be to Find a cell reference *from*,
Sheet 1
Range("A1") <Test>

and go to where ever Test is in Sheet 2 ?
'then
Selection.Offset(0, 1).Select '*Right*
End Sub

Second question
Cell A1 Cell B1 Cell C1
blank blank formulae = #VALUE!

How can I make it show 999.999 if it shows #VALUE!
when A1 and B1 has no values ?

I tried some (IFRROR,999.99,0)
but seem to have it wrong.

Thanks.

Edited by codestrung, 28 June 2005 - 04:34 AM.

• 0

### #2 dsm Posted 07 July 2005 - 06:42 AM

dsm

Member

• Member
• 98 posts
Codestrung,
Didn't completely understand question 1, but didn't make much progress anyway.

Question 2 is a little easier

A1 > 1, B1 > hh, C1 > =IF(ISERROR(A1/B1), 999.999, (A1/B1))
Result > 999.999

A1 > 1, B1 > 1, C1 > =IF(ISERROR(A1/B1), 999.999, (A1/B1))
Result > 1

A1 > Blank, B1 > Blank, C1 > =IF(ISERROR(A1^B1), 999.999, (A1^B1))
Result > 999.999

A1 > 1, B1 > 1, C1 > =IF(ISERROR(A1^B1), 999.999, (A1^B1))
Result > 1

Hope this helps
Regards
David
• 0

### Similar Topics

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users