Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default JUMPING TO THE NEAREST FORMULA CONTAINING CELL

Could an expert devise a macro for me which upon running would:

1. Check row by row every cell to find if it contains a formula;
2. Indicate in a dialogue box "Formula Found!" if a formula found;
3. Jump to such a cell.

Thanx in advance!
--

Best Regards,
FARAZ A. QURESHI
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default JUMPING TO THE NEAREST FORMULA CONTAINING CELL

Sub sth()
Dim cell As Range

For Each cell In Selection
If cell.HasFormula Then
cell.Select
MsgBox "Formula found!"
End If
Next cell

End Sub


On 14 Sty, 11:55, FARAZ QURESHI
wrote:
Could an expert devise a macro for me which upon running would:

1. Check row by row every cell to find if it contains a formula;
2. Indicate in a dialogue box "Formula Found!" if a formula found;
3. Jump to such a cell.

Thanx in advance!
--

Best Regards,
FARAZ A. QURESHI


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default JUMPING TO THE NEAREST FORMULA CONTAINING CELL

XCLent Jarek!
Thanx!

However, could you modify the code a little more so as to find cells with
references to some other cell(s), only?

For instance, if the cell contains a furmula like:

=2*10 OR
="The Date Today Is "&text(today(),"dd-mmm-yyyy")

then it is not selected. But if the formula is like:

=B1*2 OR
="The Date Today Is "&text(Sheet2!A1,"dd-mmm-yyyy")

Then it is selected, because B1 in the first and Sheet2!A1 in the other
example reflect an address/reference to another cell.

Thanx again!
--

Best Regards,
FARAZ A. QURESHI


"Jarek Kujawa" wrote:

Sub sth()
Dim cell As Range

For Each cell In Selection
If cell.HasFormula Then
cell.Select
MsgBox "Formula found!"
End If
Next cell

End Sub


On 14 Sty, 11:55, FARAZ QURESHI
wrote:
Could an expert devise a macro for me which upon running would:

1. Check row by row every cell to find if it contains a formula;
2. Indicate in a dialogue box "Formula Found!" if a formula found;
3. Jump to such a cell.

Thanx in advance!
--

Best Regards,
FARAZ A. QURESHI



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default JUMPING TO THE NEAREST FORMULA CONTAINING CELL

Sub sth()
Dim cell As Range

For Each cell In Selection
If cell.HasFormula And cell.Formula = "=B1*2" Or cell.Formula =
"=""The Date Today Is ""&TEXT(Sheet2!A1,""dd-mmm-yyyy"")" Then
cell.Select
MsgBox "Formula found!"
End If
Next cell


End Sub



On 14 Sty, 12:39, FARAZ QURESHI
wrote:
XCLent Jarek!
Thanx!

However, could you modify the code a little more so as to find cells with
references to some other cell(s), only?

For instance, if the cell contains a furmula like:

=2*10 OR
="The Date Today Is "&text(today(),"dd-mmm-yyyy")

then it is not selected. But if the formula is like:

=B1*2 OR
="The Date Today Is "&text(Sheet2!A1,"dd-mmm-yyyy")

Then it is selected, because B1 in the first and Sheet2!A1 in the other
example reflect an address/reference to another cell.

Thanx again!
--

Best Regards,
FARAZ A. QURESHI



"Jarek Kujawa" wrote:
Sub sth()
Dim cell As Range


For Each cell In Selection
* * If cell.HasFormula Then
* * * * cell.Select
* * * * MsgBox "Formula found!"
* * End If
Next cell


End Sub


On 14 Sty, 11:55, FARAZ QURESHI
wrote:
Could an expert devise a macro for me which upon running would:


1. Check row by row every cell to find if it contains a formula;
2. Indicate in a dialogue box "Formula Found!" if a formula found;
3. Jump to such a cell.


Thanx in advance!
--


Best Regards,
FARAZ A. QURESHI- Ukryj cytowany tekst -


- Poka¿ cytowany tekst -


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default JUMPING TO THE NEAREST FORMULA CONTAINING CELL

Thanx again Jarek!

But I think I wasn't clear. What I meant was that formula referring to any
other cell being caught. B1 or Sheet2!A1 were just examples. They could have
been any.

In other words any idea how to refer to a formula which has precedent cells
in VBA?

--

Best Regards,
FARAZ A. QURESHI


"Jarek Kujawa" wrote:

Sub sth()
Dim cell As Range

For Each cell In Selection
If cell.HasFormula And cell.Formula = "=B1*2" Or cell.Formula =
"=""The Date Today Is ""&TEXT(Sheet2!A1,""dd-mmm-yyyy"")" Then
cell.Select
MsgBox "Formula found!"
End If
Next cell


End Sub



On 14 Sty, 12:39, FARAZ QURESHI
wrote:
XCLent Jarek!
Thanx!

However, could you modify the code a little more so as to find cells with
references to some other cell(s), only?

For instance, if the cell contains a furmula like:

=2*10 OR
="The Date Today Is "&text(today(),"dd-mmm-yyyy")

then it is not selected. But if the formula is like:

=B1*2 OR
="The Date Today Is "&text(Sheet2!A1,"dd-mmm-yyyy")

Then it is selected, because B1 in the first and Sheet2!A1 in the other
example reflect an address/reference to another cell.

Thanx again!
--

Best Regards,
FARAZ A. QURESHI



"Jarek Kujawa" wrote:
Sub sth()
Dim cell As Range


For Each cell In Selection
If cell.HasFormula Then
cell.Select
MsgBox "Formula found!"
End If
Next cell


End Sub


On 14 Sty, 11:55, FARAZ QURESHI
wrote:
Could an expert devise a macro for me which upon running would:


1. Check row by row every cell to find if it contains a formula;
2. Indicate in a dialogue box "Formula Found!" if a formula found;
3. Jump to such a cell.


Thanx in advance!
--


Best Regards,
FARAZ A. QURESHI- Ukryj cytowany tekst -


- Pokaż cytowany tekst -





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jumping reference cell in dependent cell formula jpeterspro Excel Worksheet Functions 1 November 28th 07 10:34 AM
Jumping to a certain cell The Fool on the Hill Excel Discussion (Misc queries) 3 May 12th 07 05:07 PM
Jumping to the next cell automaticly Amarilla Excel Discussion (Misc queries) 3 October 26th 06 03:08 AM
Round amount to nearest $10 after other formula calc. in same cell debtors Excel Worksheet Functions 2 March 24th 06 11:45 AM
Highlighted cell jumping to cursor location snowedin Excel Discussion (Misc queries) 0 January 19th 05 09:16 PM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"