LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default VBA Shortcut needed

Hi
The code below is my poor attempt of entering data into one cell depending
on data in another cell:

Range("E40").Select
If ActiveCell 0 Then
Range("N40").Select
ActiveCell.FormulaR1C1 = "1"

Range("E41").Select
If ActiveCell 0 Then
Range("N41").Select
ActiveCell.FormulaR1C1 = "1"

Range("E42").Select
If ActiveCell 0 Then
Range("N42").Select
ActiveCell.FormulaR1C1 = "1"

Range("E40").Select
If ActiveCell 0 Then
Range("N40").Select
ActiveCell.FormulaR1C1 = "1"

and so on and so on............

What I need is a piece of code that does a loop (I guess) that does the same
job with a fraction of the code.

I know it can be done using formulas on the page, but I am trying to get
away from that for the time being.
Any help...............

Regards
John
 
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
keystroke shortcut needed Joe Excel Discussion (Misc queries) 3 May 27th 10 11:00 PM
shortcut has change or move so this shortcut can not open bakerstreet Excel Worksheet Functions 2 April 2nd 10 01:21 PM
Shortcut needed Tammyp Excel Discussion (Misc queries) 2 April 30th 09 10:52 PM
keystroke shortcut needed GNorton Excel Discussion (Misc queries) 3 January 5th 09 05:40 PM
Deleting Rows With Non-Needed Data between Needed Data Daren Excel Worksheet Functions 2 September 30th 08 06:47 PM


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