English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am using excel .If I place 2 (striked out using cell formatting)in A2, i need the value to be returned as zero in B2.
If I remove the"stike through" format in A2, then I need the value 2 to be displayed in B2.

Is it possible in excel?

2007-11-25 23:17:30 · 3 answers · asked by abi 1 in Computers & Internet Software

3 answers

Though, this can be done with VBA,
what is determining the criteria to strike through, and how is this action being performed?

2007-12-02 00:52:20 · answer #1 · answered by David M 6 · 0 1

You need to go to Visual Basic Editor by pressing Alt + F11. Then in the project window, you need to doubleclick the worksheet of the workbook that these cells will be in. Then past the following code into the code window.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A2").Value = 2 Then
If Range("A2").Font.Strikethrough = True Then
Range("B2").Value = 0
Else
Range("B2").Value = 2
End If
End If

End Sub

The top portion in parenthesis should say:

ByVal Target As Range

2007-11-26 04:15:08 · answer #2 · answered by devilishblueyes 7 · 2 1

i'm employing place of work 2007 Excel. do this for one cellular first. click the Conditional Formatting button. interior the window that opens, click the 2d determination in "opt for a Rule type", format purely cells that incorporate. In "Edit the guideline Description", flow away the 1st container at cellular fee, substitute the 2d container to "greatre than or equivalent to" and interior the third container enter .5 and then click the format button and then opt for the Fill tab and the p.c.. your colour. click ok, then click ok back. you have now back to the formatting unique window, click ok. Now enter records in that cellular to work out if it works the way you like it to. If it does, do a replica, and then opt for the cells you like this formatting in and then Paste specific and choose codecs. If it would not artwork extremely outstanding, flow back and play with it till it is stable. stable success.

2016-10-18 04:04:07 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers