Formula needed to populate cell with same value.

RodneyW

Active Member
Joined
Sep 24, 2010
Messages
479
Office Version
  1. 2013
Platform
  1. Windows
If G8 is populated with x, I need K8, O8, S8, W8 and AA8 each to populate with x. I also need to be able to drag the formula down to rows 9, 10, etc. Thank you in advance
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Simply put this in each of those cells
=IF(G8="x",G8,"")
 
Upvote 0
Hi

I'm no expert but, having had a lot of help on this forum, would like to be able to help others where (I think) I can ;)

Type "=K8" into each of the cells you want to show the same value, then drag down the column using the '+' on lower right corner

Good luck :)

Oops! Looks like I may have misunderstood the question! Suggest Fluff has better experience than I have ;)
 
Last edited:
Upvote 0
Fluff, thanks for your reply. The formula works exactly as intended however after applying it, I realized there's an element I hadn't considered. I can't have a formula in cells K8, etc. because if G8 does not = x, users need to be able to enter a value in K8, etc. Can Conditional Formatting or something else be applied here? I've tried that and can't get it to work.
 
Upvote 0
Nope, conditional formatting only affects the format, not the actual value in the cell.
You would need VBA
 
Upvote 0
A cell can either have a formula or a value in it, but never both at the same time.
What you want to do would require VBA.

Right-click on the sheet tab name at the bottom of your screen, select "View Code", and paste this code in the resulting VB Editor window, and this will do what you want.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

'   See if cell G8 was updated
    If Not Intersect(Target, Range("G8")) Is Nothing Then
'       See if cell G8 was set to "X"
        If Range("G8") = "X" Then
'           Populate other cells with values of cell G8
            Application.EnableEvents = False
            Range("K8,O8,S8,W8,AA8").Value = Range("G8").Value
            Application.EnableEvents = True
        End If
    End If
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,829
Messages
6,181,219
Members
453,024
Latest member
Wingit77

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