Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Recalculate on condition


Is there a way to make excel recalculate a spreadsheet if a given
condition is met/not met?

EG, =if(A1 <1,"",recalculate)


--
DavidObeid


------------------------------------------------------------------------
DavidObeid's Profile: http://www.excelforum.com/member.php...fo&userid=2238
View this thread: http://www.excelforum.com/showthread...hreadid=567317

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Recalculate on condition


I assume your worksheet is set to manual recalculation and that you
meant that A1<1 (Not equal to) below?

If so you can place this code in the Worksheet_Change event


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value < 1 Then
Calculate
End If
End Sub
--------------------


Hope this helps!


DavidObeid Wrote:
Is there a way to make excel recalculate a spreadsheet if a given
condition is met/not met?

EG, =if(A1 <1,"",recalculate)



--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=567317

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Recalculate on condition


Thanks Excelenator,

I actually meant = 1

The spreadsheet automatically calculates, but some values are user
defined, some the result of formulae and some the result of a randomly
generated number.

I don't know VBA, so can you give me idiot proof instructions as to how
to implement the solution?


--
DavidObeid


------------------------------------------------------------------------
DavidObeid's Profile: http://www.excelforum.com/member.php...fo&userid=2238
View this thread: http://www.excelforum.com/showthread...hreadid=567317

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Recalculate on condition


Sure thing.


- Copy the code below
- Right click on the sheet tab of the sheet containing your data
- Select "View Code"
- This will take you to the VBE (Visual Basic Editor)
- You should see two drop down boxes towards the top of the screen
- The one on the left says "General". Drop down and select
"Worksheet"
- Highlight the code that gets populated and right click and select
Paste to paste in the code below.
- Return to your worksheet


Now anytime the value of Cell A1 is = 1 the worksheet will
recalculate.


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 1 Then
Calculate
End If
End Sub
--------------------


--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=567317

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
3 logical condition if statement Mikehughes Excel Worksheet Functions 3 July 19th 06 01:59 PM
If more than condition forumula Corey Excel Worksheet Functions 3 June 20th 06 06:58 AM
conditional formatting - multiple condition jenhow Excel Discussion (Misc queries) 5 August 17th 05 02:45 PM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 06:57 PM
Condition IF Jeff Excel Discussion (Misc queries) 3 February 15th 05 10:19 PM


All times are GMT +1. The time now is 10:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"