Fill Down Function

Nomas

Board Regular
Joined
Jun 14, 2011
Messages
91
Good Morning!

I am trying to run this to full a calculation down a sheet ( to keep file size small) I am running into errors on the lines indicated below by arrows to the right, any guidance is appreciated! :)



Sub FillCalc_down()

' FillCalc_down
'

'
Sheets("Item Upload Template").Select
Sheets ("Item Upload Template") <----------
Range("A3:BY3").Select
Application.CutCopyMode = False
*** Selection.AutoFill Destination:=Range("A3:BY12000") <-----------


End Sub
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
You didn't mention the error, but it's not necessary to select. Try:

Code:
Sheets("Item Upload Template").Range("A3:BY3").AutoFill Destination:=Range("A3:BY12000")

HTH,
 
Upvote 0
Wow, thats uber cool, thank you so much! It worked like a charm!

Another question though.

So the code looks like this now

Sub FillCalc_down()

' FillCalc_down
'

'
Sheets("Item Upload Template").Select
Sheets("Item Upload Template").Range("A3:BY3").AutoFill Destination:=Range("A3:BY12000")


End Sub

Prior to this happening I want to paste the following formula in cell A3 of the "Item Upload Template"

=IF(CONCATENATE('Item List'!$A2:$BY2)=CONCATENATE('Item List Checksheet'!$A2:$BY2),"No Change","Upload")

Any Ideas?
 
Upvote 0
You dont need to use Select at at all, something like this should do what you were looking for


Code:
Sub FillCalc_down()
' FillCalc_down
'
'add the formula
Sheets("Item Upload Template").Range("A3").FormulaR1C1 = _
        "=IF(CONCATENATE('[Item List]Sheet1'!R[-1]C1:R[-1]C77)=CONCATENATE('Item List Checksheet'!R[-1]C1:R[-1]C77),""No Change"",""Upload"")"
'copy it down
Sheets("Item Upload Template").Range("A3:BY3").AutoFill Destination:=Range("A3:BY12000")

End Sub
 
Upvote 0
OK another issue now :confused:


The idea behind the concatenate function is that I am comparing the same row on two sheets and if they differ I want the 3rd sheet in column A to say Upload. I changed a value on the Item Sheet so that they dont = via concatenate thinking it would change to "Upload" but it is not changing. Any ideas?
 
Upvote 0
You may be better off using the exact formula for that. It compares two strings of text and returns true if they are exactly the same and false if they are not.

So your formula would look kind of like this:

=IF(EXACT(Sheet1!A1,Sheet2!A1),TRUE,FALSE)
 
Upvote 0
Hmm still returns true even if its false, do i need to convert the string to text? in the row it has text and number values.
 
Upvote 0
If your string has alphabetic characters, it is automatically treated as text. What are the two values you are comparing to see if they are equal? Are these values created via a function?
 
Upvote 0
I actually didnt look at the formula until now, I see you are trying to do it all as one. The CONCATENATE formula, you have to break it up into indivdual texts like so CONCATENATE(A1,B1,C1.....). You can add 255 text in 2007 and later and 30 in 2003 and earlier. Considering the number of columns you have to add though, if you are using 2003, you may want to consider another option.
 
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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