Return Blank if FALSE

eggo

New Member
Joined
Nov 3, 2008
Messages
33
I am using a spreadsheet to feed a mail merge in word, and I've run into a problem:
on sheet1 Column A through O contains data that I paste in from another workbook, Column P contains the following formula;

Code:
=IF(NOT(ISBLANK(A2)),VLOOKUP(TRIM(A2),Sheet2!A:D,4,0),"")

and is working fine. However, since I don't know how many rows I will be pasting in on a given day, I autofilled down to row 100. When I do the mail merge, Word 2007 assumes any row containing a value needs to be merged (a fair assumption in most cases), so it will always want to print 100 letters regardless of how many are filled with real data vs just containing the formula.

Is there a way to have my cake and eat it too? I can get around it by specifying to only print x number of records, but I can't help but think there is a better way.

Any Ideas?

Thanks in advance.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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