Insert a value in a cell without using formula in the same cell

Status
Not open for further replies.

H_gupta

New Member
Joined
Mar 26, 2019
Messages
33
Hi,

I want to default value of a cell into multiple cells based on a condition

For example : If cell C10 = "Yes", then put value of cell F10 in multiple cells like C42, I42, G42.

If cell C10 = "No", then the user can enter their own values in C42, I42, G42 etc.

I cannot put conditional formula in these cells (C42, I42, G42 ) because as soon as the user puts their own value, the formula gets deleted.

I want to be able to use the formula as well as make it editable. Is that possible ? Any workaround ?

Have tried using Macro VBA, but it gets stuck. So looking for a formula based workaround.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Right-click on the sheet tab name at the bottom of the screen, select "View Code", and paste this code in the resulting VB Editor Window:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Address = Range("C10").Address Then
        If Target = "Yes" Then
            Application.EnableEvents = False
            Range("C42,G42,I42").Value = Range("F10").Value
            Application.EnableEvents = True
        End If
    End If
    
End Sub
This code will run automatically when cell C10 is manually set to "Yes".
 
Upvote 0
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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