Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default circular reference

I am trying to make the following functionality:

Two cells:
1. cell A1 which in it I will write a price without VAT.
2. cell A2 which in it I will write a price with VAT.

The functionality will be:
1. If I am writing the price without VAT in A1, the price will automatically
be calculated into A2 and will be written with VAT.
2. on the contrary of step 1.

How am I doing this ?

Another problem I encountered is:
When I write in A1 the price, I am overriding the formula of the cell.
Do I have any option to define a formula for a cell that enables me to write
a number in the cell without overriding the formula that is defined to that
cell ?

Thanks, Ido
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default circular reference

I don't think that you can do what you want with formulas, I think that you
will need VBA.

Right click on the sheet tab and select View Code then copy and paste the
following code into the Sheet Module:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Target, Range("A:A")) Is Nothing Then GoTo ColB
Cells(Target.Row, 2).Value = _
Application.Round(Cells(Target.Row, 1).Value * 1.175, 2)
ColB:
If Intersect(Target, Range("B:B")) Is Nothing Then Exit Sub
Cells(Target.Row, 1).Value = _
Application.Round(Cells(Target.Row, 2).Value / 1.175, 2)
End Sub

The Columns A & B should then do what you want - that is assuming that your
VAT rate is 17.5%

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"circular reference" <circular
wrote in
message ...
I am trying to make the following functionality:

Two cells:
1. cell A1 which in it I will write a price without VAT.
2. cell A2 which in it I will write a price with VAT.

The functionality will be:
1. If I am writing the price without VAT in A1, the price will
automatically
be calculated into A2 and will be written with VAT.
2. on the contrary of step 1.

How am I doing this ?

Another problem I encountered is:
When I write in A1 the price, I am overriding the formula of the cell.
Do I have any option to define a formula for a cell that enables me to
write
a number in the cell without overriding the formula that is defined to
that
cell ?

Thanks, Ido



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
Circular Reference - Why? Alan Smith Excel Discussion (Misc queries) 7 January 3rd 08 04:24 PM
Is this possible? (Circular reference?) Big UT Fan Excel Discussion (Misc queries) 2 July 11th 07 04:48 PM
Why is this a circular reference? CK Excel Discussion (Misc queries) 6 June 14th 07 03:44 AM
Circular reference help! nick Excel Discussion (Misc queries) 4 March 7th 06 08:07 PM
Circular Reference... Help! Bhupinder Rayat Excel Worksheet Functions 3 January 13th 06 05:10 PM


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