Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have this code that I have put together and it works fine as long as none
of my numbers are "0's" or blank cells. 'Inserts A Header and formula Range("AU2").Select ActiveCell.FormulaR1C1 = "A" Range("AU3").Select ActiveCell.FormulaR1C1 = _ "=EXP(INDEX(LINEST(LN(RC[-25]:RC[-15]),R1C22:R1C32),1,2))" 'Inserts B Header and formula Range("AV2").Select ActiveCell.FormulaR1C1 = "B" Range("AV3").Select ActiveCell.FormulaR1C1 = "=INDEX(LINEST(LN(RC[-26]:RC[-16]),R1C22:R1C32),1)" In my spreadsheet I have values from $V$1:$AF$1 (always constant) which are my X values, V3:AF3 are my Y values. The formula works great as long as there are no 0's or blank cells, I have tried to work around this in terms of HLOOKUP and VLOOKUP but it has become more troublesome than its worth. Is there a way to code this so that if there is a blank value that it will ignore the 0 or blank and the coresponding X value (from $V$1:$AF$1). The reason the formula messes up when there is a 0 or blank cell is that you cannot take the ln(0) or a blank cell. Thank you for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |