VBA for Paste special when IF statment is TRUE

October 3, 2012 at 22:50:22
Specs: Windows 7
Hi all,

i'm looking for a VBA for a problem in my quality report table.
I have one big sheet of data in which i have a lot of cells with "IF true" statements.
Is it possible to trigger Paste Special Values with VBA to the all "IF true" statements and the result must be in the same cell where is the formula with the IF true statement.

Best Regards

See More: VBA for Paste special when IF statment is TRUE

Report •

October 4, 2012 at 06:03:00
Please explain what you are trying to do in a little more detail. I'm not sure what you mean by an "IF true" statement.

Are you saying that you only want the values pasted into cells where the value_if_true argument is returned for an IF statement?


=IF(A1>0, B1, B2)

If A1 is greater than zero then PasteSpecial the value from B1. 
If not, leave the formula in the cell.

Is that what you are trying to do?

A few examples of your formulas and data might help. Please click on the following line and read the instructions found via that link before posting any example data.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

October 29, 2012 at 03:05:11

in B1 - there is a formula with IF statement which trigger True. I want all cells in the
sheet in which cell there has been triggered IF > True statement formulas to copy there value to the same cell.

Thank You.

Report •

October 30, 2012 at 07:52:16
Can you explain why you want to elimnate the IF functions and paste the values into the cells?

The reason I ask is because I can't think of an easy way to check to, first, check every cell to see if it contains an IF function, and then second, check to see if the IF function's value_if_true argument was returned.

If I understood what you are trying to accomplish perhaps I could come up with a different approach.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

Related Solutions

October 31, 2012 at 00:08:07
i use this formula
IF(A54<'Weekly Data Sheet'!$C$3,'Weekly Data Sheet'!$C$9," ")

A54 - the first day of the week

'Weekly Data Sheet'!$C$3 - static box which i change the date in it of the begging of the week

i have multiply this formula in a lot of boxes but the Weekly Data Sheet'!$C$9 box value is changing every week and i want to have history in the previous boxes because when i change the data in the 'Weekly Data Sheet'!$C$3 if i do not copy the previous week data as value it will change to the value of the next week.

Best Regards

Report •

Ask Question