-
WScapri
AskWoody LoungerAnother method is to put a ^ in front of the formula, copy it to as many cells as you want, then block the cells and use find and replace. Find the ^ and replace it with nothing.
-
WScapri
AskWoody LoungerHans,
My dates are generally dd/mm/yyyy. My PC is set up as English(Australian). When I click on them and check the format it is general. When I run the macro the attachment is what happens. If I put my cursor in a cell that didn’t convert and press F2, then it switches to be right aligned and format dd/mm/yyy, as do the dates 12 and below.
If I block the cells and change the format to date I still have some right and some left aligned. The left aligned ones will not group in pivot tables unless I go through each cell and hit F2. When working with 45,000 rows of data, that is not practical.
As I’m not the only person who works with data from this source, I think the only solution will be getting the people who run the database, to have it extract the data without the sticky spaces. I’ve been asking for that and so far they have fixed some of the date columns but not all.
It just puzzles me at to what is happening. I can’t understand why the dates would convert to the American format when I use the Australian format.
capri
-
WScapri
AskWoody LoungerHi,
I’ve run into a problem using the macro to get rid of sticky spaces. As you can see from the attached, it seemed to fix dates where the day was 1 to 12, but anything with a date 13 to 31 it did not fix. When I check the format, the ones that were fixed are formatted as dates and the others as general. Does any one have any ideas on what is happening or a possible solution?
Thanks
capri -
WScapri
AskWoody LoungerHi,
I was explaining to another person this morning about Han’s macro to remove sticky spaces. We also discussed another problem I have with a different extract. In the other extract, the first approx. 100 dates or number format properly. The remainder look like numbers or dates, but instead of aligning on the right hand side of the column, they align on the left and there is a small red triangle in the top corner. Once on this site someone suggested that if you had the cursor in the cell and hit F2, the cell would correct which it did. I could not block these columns and change the format. It occurred to me that perhaps there was a sticky space at the end of the number or date. I just got to work, tried Han’s macro and presto, it worked like a charm. So now I have 2 uses for that handy macro.
Thanks again Hans.
-
WScapri
AskWoody LoungerHans,
I don’t know how I can ever thank you for the macro. There are many problems with the new method of data extracts and what they contain, but this was the biggest one, impacting on so many calculations.
I was searching on sticky spaces rather than empty spaces.
As the Aussies say “Thanks Heaps”.
capri
-
WScapri
AskWoody LoungerJune 20, 2008 at 7:18 am in reply to: sumproduct explained with double unary operator (2003) #1113551Thanks Hans for the explanation and sample.
capri
-
WScapri
AskWoody LoungerFor the most part I want to adjust the column to the approximate width of the contents, so when scrolling through or filtering I can see what I am looking for. Eg Surname column needs to be at least 8.5 wide, while gender column only needs to be 3.5 wide as it contains either M or F. The previous program exported everything at 8.43 and I just dragged the edges of a column to widen or shrink it’s size. The majority could be left at 8.43. With the new program exporting all columns at 14 wide, it just makes viewing to awkward as you are continually scrolling and you can’t see as much on the screen at one time. I could block all the columns and resize to 8.43 and continue as I did in the past.
I just thought if I could find a way to get them all right once, and just copy that format each time I take an extract, it would make life so much easier. Generally I find that if you think of something you are doing as boring and repititious, then there is an easier way to do it. It’s just a question of figuring out what the easier way is. This forum is great, because I’ve learned so many time saving techniques just from reading other people’s posts. I was hoping someone else had already had and solved a similar problem, and could let me know how they did it.
capri
-
WScapri
AskWoody LoungerThanks Andrew and Steve,
I guess I will try opening one and recording a macro as I re-size each column, then applying it to each new extract. I’m not very good with VBA, just haven’t had the time to learn much, but hopefully the macro recorder should work. I can alter other’s macros to suit my data, but don’t have enough understanding of what the various commands do to create my own. I don’t tend to use the macro recorder much as it tends to pick up cell addresses, which in most cases I don’t want, but for this purpose, should not impact on the result.
In the new program all the columns are 14 and I want to make most much smaller. Sometimes I just draw a blank at figuring out what to do, (a senior moment). Thanks for pointing me in the right direction.
capri
-
WScapri
AskWoody LoungerThanks Hans.
That answers why Excel on my home PC runs much quicker than at work. I thought it was because I had a faster processor, but it’s because I have Excel 2003.My big problem will be trying to get the upgrade as I work in government and they have standard software which it won’t be easy to convince them to allow just me to have an upgrade.
capri
-
WScapri
AskWoody LoungerThanks mbarron,
Your formula works great. As a bonus I won’t have to change it each month.
Thanks for explaining about Excel viewing the date as a number. I frequently have to do calculations based on dates, and I should be able to adapt this formula for other uses as well.capri
-
WScapri
AskWoody LoungerThanks Hans,
That’s exactly what I was looking for.
capri
-
WScapri
AskWoody LoungerThanks for the various suggestions. It’s always nice to have more than one method. I’ve certainly learned a few new things, about the DATEIF function and using the YEAR/TODAY functions in formulas.
The formula that Mbarron gave which starts =IF(AND has me wondering how you would know to use that combination in a formula. I understand creating IF statements and nesting them, but don’t understand that combination and how it works. Could someone suggest where I might read more on that combination or other ways to make formulas more flexible by combining functions in a similar manner.
capri
-
WScapri
AskWoody LoungerThanks so much Mbarron
The formula is exactly what I need. I am working on rolling 12 months data, so the dates need to change each month, and this will allow me to easily access the information i need.
-
WScapri
AskWoody LoungerThanks Hans,
That’s exactly what I was looking for. Once I set it up, I’ll just copy and paste each month, use find and replace to increase the size of the data extract, and I’ll have the numbers I need to use, without having to pivot the data, and hopefully my file sizes won’t be as large. I regularly lose my work having too many large files with pivot tables open at once, as my PC struggles to handle the data. I can see a lot of potential with this feature of eliminating lots of data I usually pivot. My IT area has been no help with my problems, so anything I can do to save file size makes my life easier.
capri
-
WScapri
AskWoody LoungerHans,
Each month I pull a data extract which has year to date information (our year run July to June). Sometime people want to see the month to month information and other times they just want year to date.
Pivot tables are easy, and that is what I do now, however I thought this method would save time each month, if I just copied and posted the sumproduct tables (replacing the previous final row of data with the current final row). It would save re-doing pivot tables each month. It might also save on file size as pivot tables tend to bloat my files. My monthly extracts run from 5,000 to 60,000 rows of data depending on the month.Attached is a sample of what I have and what I would like. I just need to know how to construct the formula in the shaded green cells.
capri
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Blocking Search (on task bar) from going to web
by
HenryW
5 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
4 hours, 28 minutes ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
4 hours, 34 minutes ago -
regarding april update and may update
by
heybengbeng
6 hours, 4 minutes ago -
MS Passkey
by
pmruzicka
2 hours, 8 minutes ago -
Can’t make Opera my default browser
by
bmeacham
13 hours, 44 minutes ago -
*Some settings are managed by your organization
by
rlowe44
27 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
12 hours, 38 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
1 day, 8 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day, 17 hours ago -
AI slop
by
Susan Bradley
7 hours, 26 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 18 hours ago -
Two blank icons
by
CR2
6 hours, 21 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
2 days, 3 hours ago -
End of 10
by
Alex5723
2 days, 6 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
1 day, 4 hours ago -
test post
by
gtd12345
2 days, 12 hours ago -
Privacy and the Real ID
by
Susan Bradley
2 days, 2 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
4 hours, 40 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
2 days, 16 hours ago -
Upgrading from Win 10
by
WSjcgc50
1 day, 4 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 day, 7 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
3 days, 8 hours ago -
The story of Windows Longhorn
by
Cybertooth
2 days, 19 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
3 days, 10 hours ago -
Are manuals extinct?
by
Susan Bradley
10 hours, 33 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
3 days, 19 hours ago -
Network Issue
by
Casey H
3 days, 6 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
4 days, 7 hours ago -
May 2025 Office non-Security updates
by
PKCano
4 days, 7 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.