![]() |
Using Formulae in Macros
Hi guys, can anyone help me with this problem i have, i'm using th folling formula: =SUM(IF(('Full Table'!$AF$2:$AF$6000="Baby Care")*('Ful Table'!$AG$2:$AG$6000="Goods"),'Full Table'!$AE$2:$AE$6000)) To get this formula to work though i have to do CTRL SHIFT and ENTER. The problem is i like to use my formulae in my macros so theres never formula just sitting in the workbook to try and save on space using th following command line: Worksheets("Full Table").Range("H2").Value = _ "=IF(ISERROR(VLOOKUP(G2,Requisitioners!$A$2:$E$155 ,2,FALSE)),"""",(VLOOKUP(G2,Requisitioners!$A$2:$E $155,2,FALSE)))" But if i try this command with the above formula it doesn't wor because of the CTRL SHIFT ENTER and if i try using {} around th formula it doesn't work either. Can someone please help me with this please? Cheers, Donni. :confused -- DDONN ----------------------------------------------------------------------- DDONNI's Profile: http://www.excelforum.com/member.php...fo&userid=1544 View this thread: http://www.excelforum.com/showthread.php?threadid=27207 |
Using Formulae in Macros
Worksheets("Full Table").Range("H2").FormulaArray =
-- Regards, Tom Ogilvy .. "DDONNI" wrote in message ... Hi guys, can anyone help me with this problem i have, i'm using the folling formula: =SUM(IF(('Full Table'!$AF$2:$AF$6000="Baby Care")*('Full Table'!$AG$2:$AG$6000="Goods"),'Full Table'!$AE$2:$AE$6000)) To get this formula to work though i have to do CTRL SHIFT and ENTER. The problem is i like to use my formulae in my macros so theres never a formula just sitting in the workbook to try and save on space using the following command line: Worksheets("Full Table").Range("H2").Value = _ "=IF(ISERROR(VLOOKUP(G2,Requisitioners!$A$2:$E$155 ,2,FALSE)),"""",(VLOOKUP(G 2,Requisitioners!$A$2:$E$155,2,FALSE)))" But if i try this command with the above formula it doesn't work because of the CTRL SHIFT ENTER and if i try using {} around the formula it doesn't work either. Can someone please help me with this please? Cheers, Donni. :confused: -- DDONNI ------------------------------------------------------------------------ DDONNI's Profile: http://www.excelforum.com/member.php...o&userid=15443 View this thread: http://www.excelforum.com/showthread...hreadid=272070 |
Using Formulae in Macros
Hi
try: Worksheets("Full Table").Range("H2").formulaarray= _ "=IF(ISERROR(VLOOKUP(G2,Requisitioners!$A$2:$E$155 ,2,FALSE)),"""",(VLOOKUP(G2,Requisitioners!$A$2:$E $155,2,FALSE)))" "DDONNI" wrote: Hi guys, can anyone help me with this problem i have, i'm using the folling formula: =SUM(IF(('Full Table'!$AF$2:$AF$6000="Baby Care")*('Full Table'!$AG$2:$AG$6000="Goods"),'Full Table'!$AE$2:$AE$6000)) To get this formula to work though i have to do CTRL SHIFT and ENTER. The problem is i like to use my formulae in my macros so theres never a formula just sitting in the workbook to try and save on space using the following command line: Worksheets("Full Table").Range("H2").Value = _ "=IF(ISERROR(VLOOKUP(G2,Requisitioners!$A$2:$E$155 ,2,FALSE)),"""",(VLOOKUP(G2,Requisitioners!$A$2:$E $155,2,FALSE)))" But if i try this command with the above formula it doesn't work because of the CTRL SHIFT ENTER and if i try using {} around the formula it doesn't work either. Can someone please help me with this please? Cheers, Donni. :confused: -- DDONNI ------------------------------------------------------------------------ DDONNI's Profile: http://www.excelforum.com/member.php...o&userid=15443 View this thread: http://www.excelforum.com/showthread...hreadid=272070 |
All times are GMT +1. The time now is 01:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com