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
31
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.
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,913
Office Version
  1. 365
Platform
  1. Windows
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".
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,913
Office Version
  1. 365
Platform
  1. Windows
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,122,333
Messages
5,595,560
Members
413,996
Latest member
mabelO

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
Top