Put an X in a cell based on data in 2 other cells?

TAPS_MikeDion

Well-known Member
Joined
Aug 14, 2009
Messages
622
Office Version
  1. 2011
Platform
  1. MacOS
Hi All,

Is there a formula that can be put into a macro to place an X in a cell based on data in two other cells?

What I'm trying to do is create a macro that when run will put an X in column C (starting from C5 to C???) only if there is either a numeric value in cell I5 or an X in cell J5. And this would need to run through from C5 to the last row in column C with data.

As always, thank you for any help given!
 
Fluff to the rescue AGAIN!

Thank you. Works perfectly. You're the best!
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hello all,

After all this time I just came across another issue. If an X exists in column B, then I would need the formula to NOT put an X in column C for that row.

Please and thank you to anyone who can help!
 
Upvote 0
You can just add the new criteria like
Rich (BB code):
Sub Taps()
   With Range("C5:C" & Range("I" & rows.Count).End(xlUp).Row)
      .Value = Evaluate("if((not(isnumber(" & .Offset(, 6).Address & ")))*(" & .Offset(, 8).Address & "="""")*(" & .Offset(, -2).Address & "<>""X"")*(" & .Offset(, -1).Address & "<>""X"")*((" & .Offset(, 7).Address & "="""")+(" & .Offset(, 7).Address & "=0)),""X"","""")")
   End With
End Sub
 
Upvote 0
Solution
Worked, thank you Fluff!!!

And, thank you for the explanation of the change. That will make things easier in the future, and I won't have to bother anyone for a simple change, if needed down the road.
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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