Excel Help Needed

Neil Pie
Neil Pie
Member Since:
31st Jan 2008
Telephone:
0208 2426214
Location:
North Benflee...
Posts:
1917

My Links:
Posted: 27th May 2010 - 00:06 Quote

Can anyone tell me how to return a NULL value from a formula in an Excel Sheet? Either by standard formula or VBA.

Note - I'm not talking about returning a 0 value or an empty string ("") but a NULL value, as if the cell had never had anything entered into it. Any ideas?

Cheers

Neil

Hello World

Bespoke applications for web & mobile, Wordpress development, skiffle

Freelance PHP programmer
View Profile Send Message Leave Testimonial Find Posts
 
Bukk The Trend
Rock Band Media & Promotion
Member Since:
5th Feb 2010
Telephone:
07779945828
Location:
UK & Worldwid...
Posts:
1367

My Links:
Posted: 27th May 2010 - 00:08 Quote

ISBLANK function any good?

Bukk The Trend

View Profile Send Message Leave Testimonial Find Posts TWEET ME @bukkthetrend
 
Neil Pie
Neil Pie
Member Since:
31st Jan 2008
Telephone:
0208 2426214
Location:
North Benflee...
Posts:
1917

My Links:
Posted: 27th May 2010 - 00:10 Quote

for testing if a cell is NULL, yes. Not for setting a cell as NULL.

Hello World

Bespoke applications for web & mobile, Wordpress development, skiffle

Freelance PHP programmer
View Profile Send Message Leave Testimonial Find Posts
 
Carl Nixon
Excel Expert Ltd
Member Since:
18th Jan 2010
Telephone:
029 2125 1450
Location:
Tonypandy
Posts:
6455
Posted: 27th May 2010 - 00:25 Quote

Interesting problem Neil, my initial feeling was that you were going to be out of luck, but I then came across this work around

Enter in to cell A1

=B1 C1 exactly as it is written i.e.

equals sign
B1
space
C1

Excel cant return anything for the "B1 space C1" part becaue it doesnt know what you are trying to do (is it range? is it a sum?) so it returns a null value which in turn gives you a #NULL error

Hope that makes sense

View Profile Send Message Leave Testimonial Find Posts TWEET ME @CarlNixon
 
Neil Pie
Neil Pie
Member Since:
31st Jan 2008
Telephone:
0208 2426214
Location:
North Benflee...
Posts:
1917

My Links:
Posted: 27th May 2010 - 00:49 Quote

Unfortunately that doesn't work for me.

I'm formatting raw data, which could be up to 5000 rows in Sheet1, and outputting it to Sheet2 for export to CSV, but only want it to format lines that contain data, otherwise my CSV ends up with 2 lines of data and 4998 line of commas or #NULL!s

any suggestions (other than build a PHP app to do the job...)?

Hello World

Bespoke applications for web & mobile, Wordpress development, skiffle

Freelance PHP programmer
View Profile Send Message Leave Testimonial Find Posts
 
Steve Laing
Country Computers Ltd
Member Since:
23rd Mar 2010
Telephone:
01555 373018
Location:
Lanark
Posts:
415

My Links:
Posted: 27th May 2010 - 00:56 Quote

Neil -

This VBA seems to satisfy ISBLANK() :

Sub ZapA1()
Range("A1").Select
ActiveCell.FormulaR1C1 = ""
End Sub

(In A2 I'm using =IF(ISBLANK(A1),"BLANK","NOT BLANK") as a test)

That works in 2010

 
View Profile Send Message Leave Testimonial Find Posts
 
Tony Keys
The Data Analysts
Member Since:
2nd Dec 2009
Telephone:
07900 525575
Location:
Matlock
Posts:
172

My Links:
Posted: 27th May 2010 - 01:03 Quote

Import it to an Access table, make all fields "text" and then once loaded simply "copy-paste" it back into excel? Then reset your numeric fields and rewrite your formulas. It sounds complicated but it's a doddle compared to the rest of these solutions!!

4N Group Leader at Chesterfield.

Get your data set up efficiently, and with regular RESULTS to really help build your business, and with big time saving, the time spent setting it up properly is tiny compared to the results.....get in touch!

I really struggle to get across everything I can help with in 40 seconds!!

Recently achieved "UberGeek" status with an article in PCPro magazine :-) LInk here: http://www.thedata-analysts.co.uk/index_files/PCPro_Full.jpg

Tony

07900 525575

www.thedata-analysts.co.uk

View Profile Send Message Leave Testimonial Find Posts TWEET ME @tonydataman
 
Alex Abbey
James Alexander (Yorkshire) Ltd
Member Since:
3rd Sep 2009
Telephone:
01943 831 738
Location:
Addingham
Posts:
55

My Links:
Posted: 27th May 2010 - 09:14 Quote

Why not give Sean Blessitt a call at Astradyne Ltd, he's ya man!! www.astradyne.com

Alex Abbey
Director

alex@jamesalexanderyorks.co.uk

Mobile: 07800 71 77 47

Direct: 01943 83 17 38

Fax to Email: 08448 22 34 74



View Profile Send Message Leave Testimonial Find Posts
 
Sean Blessitt
Astradyne Limited
Member Since:
24th Jan 2010
Telephone:
07710 458440
Location:
Leeds
Posts:
577

My Links:
Posted: 27th May 2010 - 09:31 Quote

Neil,

I'm just about to do the school run, but I can sort this, no worries. Can we have a chat after 9:15?

Thanks to Nick and Alex for the mentions.

Cheers


Sean

View Profile Send Message Leave Testimonial Find Posts TWEET ME @PCshortcuts

To reply to this topic please sign in or register.

Business Networking