excell formula

dollygg

New Member
Joined
Jul 21, 2010
Messages
46
this original code works fine for column A to CX:

Range("E8").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R[-7]C,[Sales.xls]SummaryReport!R8C1:R650C11,4,0)/1000"
Range("E8").Select
Selection.AutoFill Destination:=Range("E8:CX8"), Type:=xlFillDefault



However, once I change CX to CZ, the formula return #N/A for cell CY8 and CZ8. Other cells works fine. Don't know what's the reason causing it.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try
Code:
Range("E8:CZ8").FormulaR1C1 = "=VLOOKUP(R[-7]C,[Sales.xls]SummaryReport!R8C1:R650C11,4,0)/1000"

This will populate the formula to look for the value in row 1 of the same column on your Worksheet "SummaryReport" in Column A and return the value in column D, into all cells between E8 and CZ8.
 
Upvote 0
didn't work. IT's weird. I already check the cell format for different fund numbers to see why some of them works.
 
Upvote 0
Try this quick test

in a blank cell enter the formula
Code:
=CY8=pick the cell on your SummaryReport sheet that looks like a match

If you get False, something about those cells is different. Are you comparing numbers to numbers?
 
Upvote 0
The solution is found. The problem is not compaing number to number. I use ISNUMBER() and ISTEXT() to find out.

Thanks lot!
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,890
Members
452,948
Latest member
Dupuhini

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