Copying Formala across a columns in a spreadsheet usinga patern

RMadden

New Member
Joined
May 30, 2022
Messages
15
Office Version
  1. 2021
Platform
  1. Windows
I have a formula in cell B7 being =IF(SUM(DataInput!M2*1)>0,DataInput!M2+0,"")), now I want to copy this formula across a range of columns but increasing the cell references by 4 each column across for example cell C7 should by =IF(SUM(DataInput!Q2*1)>0,DataInput!Q2+0,"") . As a side issue the "*1" and "+0" part of the equation was needed for excel to recognise the results as a number
 
Okay I have read above and Fluff seems to have hit on a problem. First of all: -
1. Thanks re my coding issue - I will need to address that;
2. I will drop the XL2BB down below;
3. I tried the =LE as suggested and the options I got were "LEFT" and "LEN" not LET

StockOrderControl - updated.xlsm
ABCDEFGHIJKL
1Total#NAME?104
2Count011
3Average#NAME?104
4Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561 Brushcutter - FS560FS561
5Mulching BladeTri BladeSaw Blade 225mm FS560/FS460/FS561Duro Cut Line - FS460/FS560/FS561Locking Pin - Gear HeadAir Filter - FS560Gear Head FS560Spark Arrestor FS560FS561Flange (Collar) nut - Nyloc Rider Cup - Saw Blade FS560 FS561 FS460Guard Washer
64000 713 39024000 713 41004000 713 42110000 930 35034130 893 78004148 141 03004148 640 01074148 140 69004116 642 76014119 713 31004110 717 2801
7Aug 15, 2022#NAME?  4 1   2 
8Aug 15, 20223010  814 368 
9Aug 16, 2022          6
10Aug 25, 202238 4  18 81  
11Aug 15, 2022   4 1   2 
12           
13           
14           
15           
16           
17          
Sheet5
Cell Formulas
RangeFormula
B1:D1B1=SUM(B7:B1001)
B2B2=SUM(IF(ISERROR(DATEVALUE(TEXT(A7:A1000, "dd/MM/yyyy"))), 0, 1))
C2:D2C2=COUNTIF(C7:C1000,">0")
B3:D3B3=SUM(B1/B2)
C7:C17C7=IF(SUM(DataInput!Q2*1)>0,DataInput!Q2+0,"")
D7:D11D7=IF(SUM(DataInput!U2*1)>0,DataInput!U2+0,"")
E7:E17E7=IF(SUM(DataInput!Y2*1)>0,DataInput!Y2,"")
F7:F17F7=IF(SUM(DataInput!AC2*1)>0,DataInput!AC2,"")
G7:G17G7=IF(SUM(DataInput!AG2*1)>0,DataInput!AG2,"")
H7:H17H7=IF(SUM(DataInput!AK2*1)>0,DataInput!AK2,"")
I7:I17I7=IF(SUM(DataInput!AO2*1)>0,DataInput!AO2,"")
J7:J17J7=IF(SUM(DataInput!AS2*1)>0,DataInput!AS2,"")
K7:K17K7=IF(SUM(DataInput!AW2*1)>0,DataInput!AW2,"")
L7:L17L7=IF(SUM(DataInput!BA2*1)>0,DataInput!BA2,"")
D12:D17D12=IF(SUM(DataInput!U7*1)>0,DataInput!U7,"")
A7:A11A7=IF(DataInput!A2="","",DataInput!A2)
B7B7=LET(a,INDEX(DataInput!$M$2:$AZ$2,,COLUMNS($B7:B7)*4-3)*1,IF(ISERROR(a),"",IF(a>0,a,"")))
B8:B16B8=IF(SUM(DataInput!M3*1)>0,DataInput!M3+0,"")
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
. I tried the =LE as suggested and the options I got were "LEFT" and "LEN" not LET
So, you need to update. Look under File - Account - Update Options
Once updated, you should have the LET function.
If, for some reason, you do not want to do that or are are unable to do so, the 'full version' of Fluff's formula that I gave in post #6 should work for you.
 
Upvote 0
Thank you all. The formula now works for line 7, now I want to extend it down the page to row 1000. I removed the place holder as shown in the attached picture.
This seems to work okay.


Screenshot 2022-09-06 091333.jpg
 
Upvote 0
Yes, that should be fine. (y)

I'd still recommend getting the LET function if possible as you have quite a lot of those formulas and the LET version is more efficient.
 
Upvote 0
Thank you. From your typing fingers to the bosses pocket book.
 
Upvote 0

Forum statistics

Threads
1,215,740
Messages
6,126,585
Members
449,319
Latest member
iaincmac

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