ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro ignore formulas (https://www.excelbanter.com/excel-discussion-misc-queries/245902-macro-ignore-formulas.html)

puiuluipui

macro ignore formulas
 
Hi, is there any way this macro ignore formulas?
In column "I" i have this formula that retrieve numbers.
(=IF(G2<"",H2*G2,"")). If there are no numbers to retrieve, then the formula
doesn't display anything. But the macro keep seeing the formula. The formula
goes till row 50, and because of that, the macro is selecting the cell in row
50.
I need this macro to see only the results of formula.
Macro:
Columns("I:I").Select
Range("I1").End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Can this be done?
Thanks!

Luke M

macro ignore formulas
 
If column G is what's important, why not have the macro look there?

Range("G1").End(xlDown).Select
'Offset 2 columns now to make up difference
ActiveCell.Offset(1, 2).Select

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"puiuluipui" wrote:

Hi, is there any way this macro ignore formulas?
In column "I" i have this formula that retrieve numbers.
(=IF(G2<"",H2*G2,"")). If there are no numbers to retrieve, then the formula
doesn't display anything. But the macro keep seeing the formula. The formula
goes till row 50, and because of that, the macro is selecting the cell in row
50.
I need this macro to see only the results of formula.
Macro:
Columns("I:I").Select
Range("I1").End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Can this be done?
Thanks!


muddan madhu

macro ignore formulas
 
try like this

If Not ActiveCell.HasFormula Then
code goes here ........




On Oct 20, 12:46*am, puiuluipui
wrote:
Hi, is there any way this macro ignore formulas?
In column "I" i have this formula that retrieve numbers.
(=IF(G2<"",H2*G2,"")). If there are no numbers to retrieve, then the formula
doesn't display anything. But the macro keep seeing the formula. The formula
goes till row 50, and because of that, the macro is selecting the cell in row
50.
I need this macro to see only the results of formula.
Macro:
* * *Columns("I:I").Select
Range("I1").End(xlDown).Select
* * * *ActiveCell.Offset(1, 0).Select
Can this be done?
Thanks!



puiuluipui

macro ignore formulas
 
This was really good. I hope you can help me with the other tread.
Thanks!

"Luke M" wrote:

If column G is what's important, why not have the macro look there?

Range("G1").End(xlDown).Select
'Offset 2 columns now to make up difference
ActiveCell.Offset(1, 2).Select

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"puiuluipui" wrote:

Hi, is there any way this macro ignore formulas?
In column "I" i have this formula that retrieve numbers.
(=IF(G2<"",H2*G2,"")). If there are no numbers to retrieve, then the formula
doesn't display anything. But the macro keep seeing the formula. The formula
goes till row 50, and because of that, the macro is selecting the cell in row
50.
I need this macro to see only the results of formula.
Macro:
Columns("I:I").Select
Range("I1").End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Can this be done?
Thanks!



All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com