Two columns & cross fill input

adambjorken

New Member
Joined
Nov 17, 2016
Messages
12
Hi,

I have a spreadsheet where I have column A and column B.

In column A I want a price with V.A.T (=B1*1.25) and in column B i want a price without V.A.T (=A1*0.8).

What I mean with that is that if I enter a value in column B I want Excel to automatically fill in the value in column A.
And if I enter a value in column A I want Excel to automatically fill in the value in column B.

Can you get this type of cross referencing to work in any way?

Probably a noob question but couldn't find anything on Google or at least I'm not searching for the right terms...

Appreciate your help!

/Adam, Sweden
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi Adam,

With formulae you're always going to run into issues with circular references.

You could use a 'WorksheetChange_Event in VBA though:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If IsNumeric(Target.Value) And Target.column = 1 then Target.offset(0,1) = Target.Value *1.25

    If IsNumeric(Target.Value) And Target.column = 2 then Target.offset(0,-1) = Target.Value *0.8

End Sub

Just paste that into the code window of the relevant worksheet​ (i.e. NOT in a module).

EDIT: I actually got the 1.25 and the 0.8 the wrong way round, but you get the idea.

Cheers
JB
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top