Convert to macros

MARKEGANDERSON

Active Member
Joined
Apr 7, 2007
Messages
267
Hello All:

I have the current formula:

=SUMPRODUCT(--(Adhoc!$C$2:$C$15000=$B5),--(Adhoc!$F$2:$F$15000="Government Owned (Unit or Buyout)"),--(Adhoc!$E$2:$E$15000="20FT-DRY")+(Adhoc!$E$2:$E$15000="20FT-DRYAMMO")+(Adhoc!$E$2:$E$15000="20FT-DRYHICUBE"))

it works just fine, but the problem is having 2448 cells that requires similar formulas, which makes my workbook 10mb.

Can someone convert this into Macros?

I just need the basic set up, and I will piggyback with what you provide.

Thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Tab "LOGCAP III" is my results tab:

Cell C5=SUMPRODUCT(--(Adhoc!$C$2:$C$15000=$B5),--(Adhoc!$F$2:$F$15000="Government Owned (Unit or Buyout)"),--(Adhoc!$E$2:$E$15000="20FT-DRY")+(Adhoc!$E$2:$E$15000="20FT-DRYAMMO")+(Adhoc!$E$2:$E$15000="20FT-DRYHICUBE"))

Cell D5 =SUMPRODUCT(--(Adhoc!$C$2:$C$15000=$B5),--(Adhoc!$F$2:$F$15000="Government Owned (Unit or Buyout)"),--(Adhoc!$E$2:$E$15000="20FT-REF")+(Adhoc!$E$2:$E$15000="20FT-REFHICUBE"))

Tab "Adhoc" is my sheet i search for the required data:

Column C is the location Name (same as above Adhoc!$C$2:$C$15000=$B5)

Column E is the Container Size =()"),--(Adhoc!$E$2:$E$15000="20FT-DRY")+(Adhoc!$E$2:$E$15000="20FT-DRYAMMO")+(Adhoc!$E$2:$E$15000="20FT-DRYHICUBE"))

Column f is the Owner (Adhoc!$F$2:$F$15000="Government Owned (Unit or Buyout)")
 
Upvote 0
Can you post some example data along with the sheet name it's come from?
I think I've got the right idea but I want to make sure.
 
Upvote 0
Results Tab "LOGCAP II"
(B) (C)
20 " Dry 40" Dry
Cell B5 Cell C5

Data tab "Adhoc" Tab

(c) (d)
Location Container Size
Cell C7 Cell D7


This is the best i can do sir...

cant dind that sticky
 
Upvote 0
You could convert this to a macro, but it would take quite some time to calculate.
Converting formulas to macros is a trade off, a smaller file but a longer calculation time.

Let me have a check on the best way to do this and I'll get back to you.
 
Upvote 0
If that is the case (trade off). I will stick to my formulas. I thought using the macros would give me a smaller and quicker calculation.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,223
Members
452,896
Latest member
IGT

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