![]() |
This code won't work, any ideas?
I'm pretty new with programming in excel. I'd like to know why the following
code does not insert the formula in the cell "P" & fila. Fila is a variable (number) that changes in a loop. Range("P" & fila).Formula = "=IF(H" & fila & "="",IF(G" & fila & "="","",G" & fila & "-E" & fila & "),H" & fila & "-E" & fila & ")" Thanks! Bregards Santiago |
This code won't work, any ideas?
Range("P" & fila).formula = "=IF(H" & fila & "="""",IF(G" & fila & _
"="""","""",G" & fila & "-E" & fila & "),H" & fila & "-E" & fila & ")" -- Regards, Tom Ogilvy "Santiago" wrote in message ... I'm pretty new with programming in excel. I'd like to know why the following code does not insert the formula in the cell "P" & fila. Fila is a variable (number) that changes in a loop. Range("P" & fila).Formula = "=IF(H" & fila & "="",IF(G" & fila & "="","",G" & fila & "-E" & fila & "),H" & fila & "-E" & fila & ")" Thanks! Bregards Santiago |
This code won't work, any ideas?
thanks, got it perfectly.
regards "Tom Ogilvy" wrote: Range("P" & fila).formula = "=IF(H" & fila & "="""",IF(G" & fila & _ "="""","""",G" & fila & "-E" & fila & "),H" & fila & "-E" & fila & ")" -- Regards, Tom Ogilvy "Santiago" wrote in message ... I'm pretty new with programming in excel. I'd like to know why the following code does not insert the formula in the cell "P" & fila. Fila is a variable (number) that changes in a loop. Range("P" & fila).Formula = "=IF(H" & fila & "="",IF(G" & fila & "="","",G" & fila & "-E" & fila & "),H" & fila & "-E" & fila & ")" Thanks! Bregards Santiago |
All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com