Sunday, May 26, 2013   
  Search   
 

Office 2010 - Launch Event

Register  Login  
Forums  
     Minimize  

MeraWindows Forums - Get your Computer Problems Fixed

This is a site run by the community - for the community. At the site, we share and contribute our computer learnings with each other. We discuss about Windows, Office, Mobile, Gaming and other computer related topics. At our forums you can post your queries and our very helpful community members will respond quickly to your queries. We organize lots of competitions from time to time and award prizes to the winners.
You will need to register at the site before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelDGET  Function  - How to extent to other cells in the columnDGET Function - How to extent to other cells in the column
Previous
 
Next
New Post
12/28/2010 3:35 PM
 

Hi All ..
I think the below data explains  my problem very clearly.
I hav used DGet  function one a ell and succesfully retrived the value from the database (price - 400 ).
How can I extend the formula to the next row cell ???? Pls Help

INPUT DATA

 

 

 

 

 

OUTPUT DATA

 

 

 

Part no.

Part

Operation

Price

 

 

 

Part no.

Part

Operation

Price

 

ABC

Male

TRUE

400.00

 

 

 

ABC

Male

TRUE

400.00

DGET(INPUT,"Price",$H$2:J3)

ABC

Male

FALSE

350.00

 

 

 

ABC

Female

TRUE

#NUM!

DGET(INPUT,"Price",$H$2:J4)

ABC

Female

TRUE

200.00

 

 

 

ABC

Female

FALSE

#NUM!

DGET(INPUT,"Price",$H$2:J5)

ABC

Female

FALSE

125.00

 

 

 

ABC

Male

FALSE

#NUM!

DGET(INPUT,"Price",$H$2:J6)


Regards,
Sandhya T Ram
 
New Post
12/28/2010 3:49 PM
 
Hi,

The DGET function will never give you the desired result when copied down.  If you definitely want to use the Database functions of Excel, you may use the DSUM instead

=DSUM(input,"Price",$H$2:J3)-SUM(K$2:K2)

When you copy this formula down, you will get your desired result.

Hope this helps.

Do let me know how this works.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/28/2010 4:26 PM
 
Hi Ashish,

Thank you so much for your response, but i m afraid that the output is still the same.
For more clarity I hav uploaded the file. Pls do the needful.

Regards
Sandhya T Ram
 
 DGET - Function.xls
New Post
12/28/2010 4:31 PM
 
Hi,

There is some error in downloading the file.  Please upload the file on some free file hosting server such as
www.mediafire.com or Google Docs and then provide a link to the uploaded file as a response to this message.

Also, i cross checked my formula and the answers are correct.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/28/2010 4:37 PM
 
I hav uploaded the file .Pls check.

http://www.mediafire.com/?7yni9jxdbwa...

Regards
Sandhya T Ram

 
New Post
12/28/2010 4:44 PM
 
Hi,

The formula is DSUM and not DGET.  Please change that and your output will be as desired.

Do let me know how this works.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/28/2010 10:31 PM
 
Hi,

I m very sorry for that  carelessness . Its working exactly as desired. THANX LOADS.
I hav one more query : Is there any function for looping the rows till the condition is satisfied...may be like  "WHILE LOOP" or  "FOR LOOP" kind?
Pls  help.

Regards
Sandhya T Ram



 
New Post
12/29/2010 4:56 AM
 
Hi,

Thank you for replying.  I am glad my solution worked.  Please be specific about the MS Excel "looping" question

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/29/2010 9:48 AM
 
Hi,

Usally we use macros when we need to use iterative statements (like for loop ,while do loop etc ....)

eg.
Dim i As Range
For Each i In Range("A1:A10")  'Any range
i.Value = i.Value + 1   'Block of code
Next i

Is there any build in funtion to perform this without using any macros????

Regards
Sandhya T Ram

 
New Post
12/29/2010 9:52 AM
 
Hi,

Yes, the SUBTOTAL() function can loop.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/29/2010 10:48 AM
 
hi,
Thankx for that info.
But the issue is range of the cells  to be looped ( selected for looping )  is based on one / multuple crietria.
So how and where do I define the crietria of the range to be seleted.
PLZ HELP...

Regards
Sandhya T Ram

 
New Post
12/29/2010 10:52 AM
 
Hi,

As requested, please explain the MS Excel question very clearly.  Just as you clearly articulated the DGET question, please explain this question as well.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/29/2010 11:32 AM
 
Hi,

I happen to observe one more issue with DSUM solution .
Pls download the file. I hav explained the Looping  and  DSUM Issues
http://www.mediafire.com/?aaco7q7nf9a...

Regards
Sandhya T Ram
 
New Post
12/29/2010 11:53 AM
 
Hi,

Both issues are resolved - kindl refer to the following file -
http://www.mediafire.com/file/6779wsb99c8b9hf/C___Documents_and_Settings__stram9__Desktop__XL_ISSUE.xls

Do let me know how this works.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/29/2010 2:24 PM
 

Hi,

With ref to looping issue xls file:

  • A person can do  any no. of job  in a day but the the sumation  of the jobs for a particular person on particular day has to be calculated .
  • In this case I have to loop the n of rows where "n" is dynamic in nature based on no. of job done by a person on particular day.
  • So, how and where  do I define the critrea  to select the n rows???? Which is dynamic in nature.??

with ref to your sol given:
 
IF(OR(COUNTA(C11:H11)=0,AND(C11=C12,D11=D12)),"",SUMPRODUCT((C$8:C11=C11)*(D$8:D11=D11)*(H$8:H11))-280)

above undelined  are applicable only to the records having to loop only 2 rows....

2-Dec-10

ABC

job1

125

1.50

187.5

 

 

2-Dec-10

ABC

job2

145

2.00

290

 

197.5

2-Dec-10

xyz

job2

200

2.40

480

 

200


In this case databse was minimal  ...so the comparision was simple...to loop 2 row ( fixed the loop for two by manually conclusion)
wat if the case is for "n" no of rows???? where n is dynamic?????????


 
New Post
12/29/2010 2:34 PM
 
Hi,

You have not quoted a situation where my formula would yield an incorret resuly.  I just changed the xyz to ABC.  The solution was 677.5 in cell J12 (J10:J11 was blank).

Please bring up the case (like tyou did for the DSUM()), where my formula does not give the expected result.

For my formula to work person appearing for every date should all appear together i.e. the data should first be sorted by Date and then by Person

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/29/2010 2:55 PM
 
Hi,

I tried adding records fro the same table u send (formula wat u sent is restored)
See the output......

Date

Person

Job

Qty

Price

Wage

 

My formula

 

 

 

 

 

 

 

 

1-Dec-10

XYZ

job1

200

1.00

200.00

 

-80.00

1-Dec-10

XYZ

job2

50

8.00

400

 

320.00

 

 

 

 

 

 

 

 

2-Dec-10

ABC

job1

125

1.50

187.5

 

-92.50

2-Dec-10

ABC

job1

145

2.00

290

 

197.50

2-Dec-10

XYZ

job2

200

2.40

480

 

200.00

2-Dec-10

XYZ

job2

200

2.40

480

 

680.00

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4-Dec-10

XYZ

job4

100

1.00

100

 

-180.00

4-Dec-10

PQR

job4

150

1.50

225

 

-55.00

 

 

 

 

 

 

 

 

5-Dec-10

abc

job2

250

1.75

437.5

 

157.50


Regards
Sandhya T Ram
 
New Post
12/29/2010 2:55 PM
 
Hi,

I tried adding records fro the same table u send (formula wat u sent is restored)
See the output......

Date

Person

Job

Qty

Price

Wage

 

My formula

 

 

 

 

 

 

 

 

1-Dec-10

XYZ

job1

200

1.00

200.00

 

-80.00

1-Dec-10

XYZ

job2

50

8.00

400

 

320.00

 

 

 

 

 

 

 

 

2-Dec-10

ABC

job1

125

1.50

187.5

 

-92.50

2-Dec-10

ABC

job1

145

2.00

290

 

197.50

2-Dec-10

XYZ

job2

200

2.40

480

 

200.00

2-Dec-10

XYZ

job2

200

2.40

480

 

680.00

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4-Dec-10

XYZ

job4

100

1.00

100

 

-180.00

4-Dec-10

PQR

job4

150

1.50

225

 

-55.00

 

 

 

 

 

 

 

 

5-Dec-10

abc

job2

250

1.75

437.5

 

157.50


Regards
Sandhya T Ram
 
New Post
12/29/2010 3:02 PM
 
Hi,

There is something wrong you are doing.  I have uploaded the file with my solution - see column M of sheet named "Looping issue".

Please check and let me know.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
 C___Documents_and_Settings__stram9__Desktop__XL_ISSUE.xls
New Post
12/30/2010 12:22 PM
 
Hi  Ashish,

Very Sorry for late reply....As I was researching your formula and sloving methodology.....I
was completely lost and forgot to reply ontime.....First of all Thanx Million :) ....
could u pls suggest me any sites to look for such solving methodology or explaining such  logics???

Regards
Sandhya T Ram
 
Previous
 
Next
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelDGET  Function  - How to extent to other cells in the columnDGET Function - How to extent to other cells in the column


   User Log In Minimize  


Register
Forgot Password ?

     
  
   Follow Us Minimize  
     
  
     Minimize