Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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




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
Vlookup won't work, any other ideas? Huw Excel Worksheet Functions 0 February 17th 05 04:31 PM
formula from Excel97 doesn't work in Excel2003,any ideas why? nic Excel Worksheet Functions 6 November 8th 04 04:40 PM
RE Any ideas why this simple proc. won't work? Steph[_3_] Excel Programming 2 June 4th 04 06:05 PM
Any ideas why this simple proc. won't work? Steph[_3_] Excel Programming 1 June 4th 04 04:00 PM
Any ideas... Doesn't work... Andrew Slentz Excel Programming 1 May 10th 04 06:43 PM


All times are GMT +1. The time now is 05:37 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"