Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to enter 'CTRL-SHIFT-ENTER' in vb

I need to enter the 'ctrl-shift-enter' key sequence in a
cell that I am writing to.

Current code:

sheets("name").range("aa1").value = _
"{=sum(if(a1=nr,if(dept=70,if(acct=9," _
& "data!$k$2:$k$2000))))}"

upon execution of macro, cell aa1 contains data within
quotes, not the sum i'm looking for.

if i edit the cell & remove the { & }, then manually enter
the 'CTRL-SHIFT-ENTER' keystroke the cell updates
correctly?

Help

Thanks mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default how to enter 'CTRL-SHIFT-ENTER' in vb

Hi have a look at the
formulaarray
property

--
Regards
Frank Kabel
Frankfurt, Germany


Mike Molyneaux wrote:
I need to enter the 'ctrl-shift-enter' key sequence in a
cell that I am writing to.

Current code:

sheets("name").range("aa1").value = _
"{=sum(if(a1=nr,if(dept=70,if(acct=9," _
& "data!$k$2:$k$2000))))}"

upon execution of macro, cell aa1 contains data within
quotes, not the sum i'm looking for.

if i edit the cell & remove the { & }, then manually enter
the 'CTRL-SHIFT-ENTER' keystroke the cell updates
correctly?

Help

Thanks mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default how to enter 'CTRL-SHIFT-ENTER' in vb

Check out the range FormulaArray method.

--
Jim Rech
Excel MVP
"Mike Molyneaux" wrote in message
...
|I need to enter the 'ctrl-shift-enter' key sequence in a
| cell that I am writing to.
|
| Current code:
|
| sheets("name").range("aa1").value = _
| "{=sum(if(a1=nr,if(dept=70,if(acct=9," _
| & "data!$k$2:$k$2000))))}"
|
| upon execution of macro, cell aa1 contains data within
| quotes, not the sum i'm looking for.
|
| if i edit the cell & remove the { & }, then manually enter
| the 'CTRL-SHIFT-ENTER' keystroke the cell updates
| correctly?
|
| Help
|
| Thanks mike


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default how to enter 'CTRL-SHIFT-ENTER' in vb

Mike, is it feasible to select on the range you are interested in first,
then use
Selection.FormulaArray
? Something like this
Selection.FormulaArray = "=IF(SUM(C[1])= 300, ""Yes"", ""No"")"
"Mike Molyneaux" wrote in message
...
I need to enter the 'ctrl-shift-enter' key sequence in a
cell that I am writing to.

Current code:

sheets("name").range("aa1").value = _
"{=sum(if(a1=nr,if(dept=70,if(acct=9," _
& "data!$k$2:$k$2000))))}"

upon execution of macro, cell aa1 contains data within
quotes, not the sum i'm looking for.

if i edit the cell & remove the { & }, then manually enter
the 'CTRL-SHIFT-ENTER' keystroke the cell updates
correctly?

Help

Thanks mike



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to enter 'CTRL-SHIFT-ENTER' in vb


Thank all of you very much, working great.
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
Ctrl+shift+enter [email protected] Excel Worksheet Functions 9 March 26th 09 11:46 AM
What is Ctrl + Shift + Enter ? lawson Excel Discussion (Misc queries) 6 June 26th 07 08:17 PM
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. qwopzxnm Excel Worksheet Functions 2 October 20th 05 09:06 PM
ctrl+shift+enter vs enter tkaplan Excel Discussion (Misc queries) 7 May 27th 05 05:10 PM
ctrl/shift/enter thru VBA Jason Morin[_2_] Excel Programming 7 May 5th 04 05:20 PM


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

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"